summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-gnus.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-08-15 13:00:22 +0100
committerjao <jao@gnu.org>2022-08-15 13:00:22 +0100
commitcadea0a2da15bb51ede10d0317f8c8fc79d098d9 (patch)
tree7da5553676ab4114895a2890576669a201f3436d /custom/jao-custom-gnus.el
parent5e22e2e18735e0b253afc07bb9d5ea41d7346f28 (diff)
downloadelibs-cadea0a2da15bb51ede10d0317f8c8fc79d098d9.tar.gz
elibs-cadea0a2da15bb51ede10d0317f8c8fc79d098d9.tar.bz2
gnus: org-agenda-list only on demand (it's slooow)
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r--custom/jao-custom-gnus.el15
1 files changed, 5 insertions, 10 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index 2256603..6b1fd4a 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -353,20 +353,13 @@
(setq jao-gnus--notify-strs (jao-gnus--notify-strs))
(jao-minibuffer-refresh))
-(defun jao-gnus-scan ()
- (interactive)
- (let ((inhibit-message t))
- (gnus-demon-scan-mail)
- (jao-gnus--notify)))
-
(require 'gnus-demon)
(gnus-demon-add-handler 'gnus-demon-scan-news 5 1)
;; (gnus-demon-remove-handler 'gnus-demon-scan-news)
-(add-hook 'gnus-started-hook #'jao-gnus-scan)
+(add-hook 'gnus-started-hook #'jao-gnus--notify)
(add-hook 'gnus-summary-exit-hook #'jao-gnus--notify)
-(add-hook 'gnus-summary-exit-hook #'org-agenda-list)
-(add-hook 'gnus-after-getting-new-news-hook #'jao-gnus-scan)
+(add-hook 'gnus-after-getting-new-news-hook #'jao-gnus--notify)
(with-eval-after-load "jao-minibuffer"
(jao-minibuffer-add-variable 'jao-gnus--notify-strs -20))
@@ -441,7 +434,7 @@
gnus-refer-thread-use-search t
gnus-auto-select-next 'almost-quietly)
-;;;; search
+;;;; search on enter nnselect
(defun jao-gnus--maybe-reselect (&rest _i)
(when (string-match-p "^nnselect" (or (gnus-group-name-at-point) ""))
(save-excursion (gnus-group-get-new-news-this-group))))
@@ -745,3 +738,5 @@
(define-key gnus-summary-mode-map "X" 'jao-gnus-arXiv-capture)
(define-key gnus-summary-mode-map "e" 'jao-gnus-open-enclosure)
(define-key gnus-summary-mode-map "\C-l" nil)
+(define-key gnus-group-mode-map (kbd "A") 'nil)
+(define-key gnus-topic-mode-map (kbd "A") 'org-agenda-list)