From 5a3f184f25bc4230d4d95d81e203f328839f8737 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 4 Oct 2021 00:29:17 +0100 Subject: misc nits --- notmuch.org | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'notmuch.org') 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)) -- cgit v1.2.3