summaryrefslogtreecommitdiffhomepage
path: root/notmuch.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-04 00:29:17 +0100
committerjao <jao@gnu.org>2021-10-04 00:29:17 +0100
commit5a3f184f25bc4230d4d95d81e203f328839f8737 (patch)
tree1abee80d656374c50b1cdf9b9ae9e95a0ab6addc /notmuch.org
parent069d6132f3c7415a22d9f00e533ad14d55d95e15 (diff)
downloadelibs-5a3f184f25bc4230d4d95d81e203f328839f8737.tar.gz
elibs-5a3f184f25bc4230d4d95d81e203f328839f8737.tar.bz2
misc nits
Diffstat (limited to 'notmuch.org')
-rw-r--r--notmuch.org12
1 files changed, 10 insertions, 2 deletions
diff --git a/notmuch.org b/notmuch.org
index 5e838e4..3dc46b7 100644
--- a/notmuch.org
+++ b/notmuch.org
@@ -345,9 +345,17 @@
(interactive)
(jao-notmuch-tree--forward t))
+ (defun jao-notmuch--via-url ()
+ (when (window-live-p notmuch-tree-message-window)
+ (with-selected-window notmuch-tree-message-window
+ (goto-char (point-min))
+ (when (re-search-forward "^Via: http" nil t)
+ (thing-at-point-url-at-point)))))
+
(defun jao-notmuch-browse-url (ext)
(interactive "P")
- (when-let (url (car (last (jao-notmuch-message-urls))))
+ (when-let (url (or (jao-notmuch--via-url)
+ (car (last (jao-notmuch-message-urls)))))
(funcall (if ext browse-url-secondary-browser-function #'browse-url)
url)))
@@ -424,7 +432,7 @@
(defun org-notmuch-store-link ()
"Store a link to a notmuch mail message."
- (case major-mode
+ (cl-case major-mode
((notmuch-show-mode notmuch-tree-mode)
;; Store link to the current message
(let* ((id (notmuch-show-get-message-id))