diff options
-rw-r--r-- | email.org | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -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) |