summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@kelar.org>2024-03-30 23:59:06 -0400
committerAmin Bandali <bandali@kelar.org>2024-03-30 23:59:06 -0400
commit2fb78b99b55b612fc758397fdd421ae1de8a51ef (patch)
treee12bd683fcf50b3d906689fa8f800a7284817e40
parent293c1d450363105f714316a01d9462eda7a9f99f (diff)
downloadconfigs-2fb78b99b55b612fc758397fdd421ae1de8a51ef.tar.gz
configs-2fb78b99b55b612fc758397fdd421ae1de8a51ef.tar.xz
configs-2fb78b99b55b612fc758397fdd421ae1de8a51ef.zip
Add a few custom gnus summary mode bindings
Diffstat (limited to '')
-rw-r--r--.emacs.d/lisp/bandali-gnus.el37
1 files changed, 29 insertions, 8 deletions
diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el
index 2558d24..18c6b2e 100644
--- a/.emacs.d/lisp/bandali-gnus.el
+++ b/.emacs.d/lisp/bandali-gnus.el
@@ -250,6 +250,14 @@
gnus-thread-sort-by-date))
(with-eval-after-load 'message
(setq gnus-ignored-from-addresses message-dont-reply-to-names))
+
+ (defun b/gnus-junk-article (&optional n)
+ (interactive "P" gnus-summary-mode)
+ (gnus-summary-move-article
+ n
+ (gnus-group-prefixed-name
+ "Junk"
+ (gnus-find-method-for-group gnus-newsgroup-name))))
;; local key bindings
(define-key gnus-summary-mode-map (kbd "M-L") #'org-store-link)
;; (define-key gnus-summary-mode-map (kbd "r")
@@ -258,14 +266,27 @@
;; #'gnus-summary-wide-reply-with-original)
(defvar b/gnus-summary-prefix-map)
(define-prefix-command 'b/gnus-summary-prefix-map)
- (define-key gnus-summary-mode-map (kbd "v")
- 'b/gnus-summary-prefix-map)
- (define-key b/gnus-summary-prefix-map (kbd "r")
- #'gnus-summary-reply)
- (define-key b/gnus-summary-prefix-map (kbd "w")
- #'gnus-summary-wide-reply)
- (define-key b/gnus-summary-prefix-map (kbd "v")
- #'gnus-summary-show-raw-article))
+ (define-key
+ gnus-summary-mode-map (kbd "v")
+ 'b/gnus-summary-prefix-map)
+ (define-key
+ b/gnus-summary-prefix-map (kbd "r r")
+ #'gnus-summary-very-wide-reply)
+ (define-key
+ b/gnus-summary-prefix-map (kbd "r q")
+ #'gnus-summary-very-wide-reply-with-original)
+ (define-key
+ b/gnus-summary-prefix-map (kbd "R r")
+ #'gnus-summary-reply)
+ (define-key
+ b/gnus-summary-prefix-map (kbd "R q")
+ #'gnus-summary-reply-with-original)
+ (define-key
+ b/gnus-summary-prefix-map (kbd "r a w")
+ #'gnus-summary-show-raw-article)
+ (define-key
+ b/gnus-summary-prefix-map (kbd "s")
+ #'b/gnus-junk-article))
;; hooks
(add-hook 'gnus-summary-mode-hook #'b/no-mouse-autoselect-window)