summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic.el4
-rw-r--r--elfeed-conf.el14
2 files changed, 18 insertions, 0 deletions
diff --git a/basic.el b/basic.el
index eb7ab1e..84c358c 100644
--- a/basic.el
+++ b/basic.el
@@ -198,6 +198,10 @@ window, then also delete the selected window."
(define-key global-map (vector ?\s-k) #'durand-kill-current-buffer)
+;;; zap-up-to-char and zap-to-char are both useful.
+
+(define-key global-map (vector (logior (ash 1 27) #x5a)) #'zap-up-to-char)
+
;;; Repeating pops
;;;###autoload
diff --git a/elfeed-conf.el b/elfeed-conf.el
index 61e43a9..94c6f72 100644
--- a/elfeed-conf.el
+++ b/elfeed-conf.el
@@ -37,6 +37,8 @@
(list "https://protesilaos.com/politics.xml"
'prot 'politics)))
+(define-key elfeed-search-mode-map (vector #x78) 'elfeed-search-exit)
+
;; I still prefer the defaults.
(setq elfeed-show-entry-switch #'switch-to-buffer)
@@ -56,5 +58,17 @@
((one-window-p))
((delete-window (get-buffer-window (current-buffer))))))
+;;;###autoload
+(defun elfeed-search-exit ()
+ "Save the database, then kill all related buffers."
+ (interactive)
+ (elfeed-db-save)
+ (mapc
+ (function
+ (lambda (buffer)
+ (cond ((string-match-p "^\\*elfeed" (buffer-name buffer))
+ (kill-buffer buffer)))))
+ (buffer-list)))
+
(provide 'elfeed-conf)
;;; elfeed-conf.el ends here