summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-06 22:14:31 +0100
committerjao <jao@gnu.org>2021-06-06 22:14:31 +0100
commit1bdcf80a11af8b1b7c0eac8bb704cc4b55330ca1 (patch)
treec978be0b3645748d4069dbc0e7f9390a27f94b9a /email.org
parenta571e4ce77c441eeb1ee095f70e680d35301003c (diff)
downloadelibs-1bdcf80a11af8b1b7c0eac8bb704cc4b55330ca1.tar.gz
elibs-1bdcf80a11af8b1b7c0eac8bb704cc4b55330ca1.tar.bz2
notmuch: better "and click" on message buffers
Diffstat (limited to 'email.org')
-rw-r--r--email.org23
1 files changed, 14 insertions, 9 deletions
diff --git a/email.org b/email.org
index 88fa6c7..669607d 100644
--- a/email.org
+++ b/email.org
@@ -390,12 +390,14 @@
(defun jao-notmuch-refresh-hello ()
(interactive)
- (when (derived-mode-p 'notmuch-hello-mode)
- (when (not (string-blank-p jao-notmuch-minibuffer-string))
- (let ((notmuch-hello-auto-refresh nil)) (notmuch-hello)))
- (let ((inhibit-message t))
- (beginning-of-buffer)
- (widget-forward 2))))
+ (ignore-errors
+ (when (and (string= "Mail" (jao-afio-current-frame))
+ (derived-mode-p 'notmuch-hello-mode))
+ (when (not (string-blank-p jao-notmuch-minibuffer-string))
+ (let ((notmuch-hello-auto-refresh nil)) (notmuch-hello)))
+ (let ((inhibit-message t))
+ (beginning-of-buffer)
+ (widget-forward 2)))))
(defun jao-notmuch-open-enclosure (add)
(interactive "P")
@@ -433,12 +435,15 @@
(let ((b (current-buffer)))
(select-window notmuch-tree-message-window)
(setq-local jao-notmuch--tree-buffer b)
- (when (and and-click (button-at (point))) (push-button))
- t)))
+ (or (not and-click)
+ (cond ((eww--url-at-point) (shr-browse-url) 'url)
+ ((button-at (point)) (push-button) 'button))))))
(defun jao-notmuch-click-message-buffer ()
(interactive)
- (save-window-excursion (jao-notmuch-goto-message-buffer t)))
+ (let ((b (current-buffer)))
+ (unless (eq 'url (jao-notmuch-goto-message-buffer t))
+ (pop-to-buffer b))))
(defun jao-notmuch-goto-index-buffer ()
(interactive)