diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-02-16 14:02:51 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-02-16 14:04:01 -0700 |
commit | b522c413b8774cfdf1e8e629acc5547fc0f875a0 (patch) | |
tree | b3f7087a9fb5a105ecfbc11961866572254c902a | |
parent | 9d197e9e3bc01d5fde70a78c52955c55418e7ecc (diff) | |
download | dotfiles-b522c413b8774cfdf1e8e629acc5547fc0f875a0.tar.gz |
spw/...-advance-and-archive: don't confirm if whole buffer visible
-rw-r--r-- | .emacs.d/notmuch-config.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/.emacs.d/notmuch-config.el b/.emacs.d/notmuch-config.el index 51e19392..9e2804b7 100644 --- a/.emacs.d/notmuch-config.el +++ b/.emacs.d/notmuch-config.el @@ -491,13 +491,14 @@ scroll through them." ;; it not yet at the bottom of the window (pos-visible-in-window-p (point-max)) (notmuch-show-advance)) - (if (let ((map (make-sparse-keymap))) - (set-keymap-parent map query-replace-map) - (define-key map " " 'ignore) - ;; override usual map so SPC cannot confirm the archive, to avoid - ;; accidental archives - (let ((query-replace-map map)) - (y-or-n-p "Mark all as read before moving on?"))) + (if (or (pos-visible-in-window-p (point-min)) + (let ((map (make-sparse-keymap))) + (set-keymap-parent map query-replace-map) + (define-key map " " 'ignore) + ;; override usual map so SPC cannot confirm the archive, to + ;; avoid accidental archives + (let ((query-replace-map map)) + (y-or-n-p "Mark all as read before moving on?")))) (when (and notmuch-show-thread-id notmuch-archive-tags) ;; only tag messages which would have been expanded when we opened ;; the thread |