-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
89 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "eww-history-ext" | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
authors = ["Jiacai Liu <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
;; Copyright (C) 2022 Jiacai Liu | ||
|
||
;; Author: Jiacai Liu <[email protected]> | ||
;; Version: 0.1.0 | ||
;; Version: 0.2.0 | ||
;; Package-Requires: ((emacs "25.1")) | ||
;; Keywords: eww, elfeed, history | ||
;; URL: https://github.com/1History/eww-history-ext | ||
|
@@ -62,6 +62,7 @@ | |
(define-key map (kbd "w") 'eww-history-ext-copy-history-url) | ||
(define-key map (kbd "t") 'eww-history-ext-copy-history-title) | ||
(define-key map (kbd "s") 'eww-history-ext-search-by-keyword) | ||
(define-key map (kbd "d") 'eww-history-ext-delete-history) | ||
(define-key map (kbd "s-u") 'tabulated-list-revert) | ||
map) | ||
"Local keymap for eww-history-ext mode buffers.") | ||
|
@@ -162,6 +163,14 @@ | |
(kill-new title)) | ||
(user-error "There is no history at point"))) | ||
|
||
(defun eww-history-ext-delete-history () | ||
"Delete history at point." | ||
(interactive) | ||
(if-let ((entry (tabulated-list-delete-entry))) | ||
(eww-history-ext-dyn--delete-history eww-history-ext-db | ||
(string-to-number (car entry))) | ||
(user-error "There is no history at point"))) | ||
|
||
(defun eww-history-ext-tabulated-list-revert (&optional revert) | ||
(setq-local eww-history-ext-query-keyword eww-history-ext-default-query-keyword) | ||
(setq-local eww-history-ext-query-limit eww-history-ext-default-query-limit)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters