Ah! That's good to know! So here is my final, hopefully fully-functioning version then: --8<---------------cut here---------------start------------->8--- (defvar ambrevar/known-mailing-list-archives '(("help-guix@gnu.org" . "guix") ("guix-devel@gnu.org" . "guix") ("debbugs.gnu.org" . "guix")) "Alist of mail adresses and their Yhetil name. Alternatively the key may just be a host name against which a recipient will be matched.") (defun ambrevar/guess-yhetil-link (message-id) (let* ((all-addresses (mapcar #'second (mail-extract-address-components (mapconcat #'identity (list (notmuch-show-get-header :To) (notmuch-show-get-header :Cc)) ", ") 'all))) (match-address (lambda (address-or-host) (if (string-match "@" address-or-host) (member address-or-host all-addresses) (seq-find (lambda (address) (string-match address-or-host address)) all-addresses)))) (mailing-list (alist-get (seq-find match-address (mapcar #'car ambrevar/known-mailing-list-archives)) ambrevar/known-mailing-list-archives nil nil #'string=))) (when mailing-list (concat "https://yhetil.org/" mailing-list "/" message-id)))) (add-to-list 'notmuch-show-stash-mlarchive-link-alist (cons "Yhetil" #'ambrevar/guess-yhetil-link)) (setq notmuch-show-stash-mlarchive-link-default "Yhetil") --8<---------------cut here---------------end--------------->8--- Cheers! -- Pierre Neidhardt https://ambrevar.xyz/