summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-03-25 11:50:21 -0700
committerSean Whitton <spwhitton@spwhitton.name>2023-04-16 13:07:22 -0700
commit2efb0d39074f2bed64e5cf3d21ffa99bd97992a5 (patch)
tree92256fd03e31f8753137464b6e372044cc0f915e
parent265965a188bb349a19e763c0869b87630beeaf02 (diff)
downloaddotfiles-2efb0d39074f2bed64e5cf3d21ffa99bd97992a5.tar.gz
rearrange
-rw-r--r--.emacs.d/init.el39
1 files changed, 20 insertions, 19 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index ab917663..e3dba6c8 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -3261,25 +3261,26 @@ mutt's review view, after exiting EDITOR."
(spw/defun-pass-to-gdbmacs spw/gnus (&optional fetch-and-inbox)
(interactive "P")
(require 'gnus)
- (if (not fetch-and-inbox)
- (if (gnus-alive-p) (pop-to-buffer-same-window gnus-group-buffer) (gnus))
- ;; We want to see mail that we think has just come in. This is the only
- ;; time we call 'notmuch new' without --no-hooks from Emacs rather than
- ;; just waiting for cron, because it's slow.
- (unless (gnus-alive-p) (gnus))
- (unless (spw/on-host-p "athena.silentflame.com")
- (with-temp-message "Fetching from all accounts on athena ..."
- (call-process "ssh" nil nil nil "athena" "sh" "-lc" "movemymail")))
- (with-temp-message "Fetching mail locally ..."
- (call-process "movemymail"))
- (let* ((group (cl-case (prefix-numeric-value current-prefix-arg)
- (4 "nnselect:Process-Weekend")
- (16 "nnselect:Process-Weekday")))
- (buffer (gnus-summary-buffer-name group)))
- (if (not (get-buffer buffer))
- (gnus-group-read-group nil t group)
- (pop-to-buffer-same-window buffer)
- (gnus-summary-rescan-group)))))
+ (if fetch-and-inbox
+ ;; We want to see mail that we think has just come in. This is the only
+ ;; time we call 'notmuch new' without --no-hooks from Emacs rather than
+ ;; just waiting for cron, because it's slow.
+ (let* ((group (cl-case (prefix-numeric-value current-prefix-arg)
+ (4 "nnselect:Process-Weekend")
+ (16 "nnselect:Process-Weekday")))
+ (buffer (gnus-summary-buffer-name group)))
+ (unless (gnus-alive-p) (gnus))
+ (unless (spw/on-host-p "athena.silentflame.com")
+ (with-temp-message "Fetching from all accounts on athena ..."
+ (call-process "ssh" nil nil nil "athena"
+ "sh" "-lc" "movemymail")))
+ (with-temp-message "Fetching mail locally ..."
+ (call-process "movemymail"))
+ (if (not (get-buffer buffer))
+ (gnus-group-read-group nil t group)
+ (pop-to-buffer-same-window buffer)
+ (gnus-summary-rescan-group)))
+ (if (gnus-alive-p) (pop-to-buffer-same-window gnus-group-buffer) (gnus))))
(global-set-key "\C-cgn" #'spw/gnus)
(defun spw/gnus-goto-all-articles (group article)