From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Kyle Meyer <kyle@kyleam.com>
Cc: help-guix@gnu.org
Subject: Re: Workflow with mu4e + magit for sending patchsets to guix?
Date: Tue, 01 Dec 2020 10:10:56 +0100 [thread overview]
Message-ID: <874kl5dh7j.fsf@ambrevar.xyz> (raw)
In-Reply-To: <87k0u2lboq.fsf@kyleam.com>
[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]
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/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
next prev parent reply other threads:[~2020-12-01 9:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 20:28 Workflow with mu4e + magit for sending patchsets to guix? Christopher Lemmer Webber
2020-11-16 20:48 ` Christopher Baines
2020-11-16 23:49 ` zimoun
2020-11-17 2:36 ` Kyle Meyer
2020-11-17 7:28 ` Pierre Neidhardt
2020-11-17 14:10 ` zimoun
2020-11-25 9:19 ` Pierre Neidhardt
2020-11-25 12:33 ` zimoun
2020-11-26 9:51 ` Pierre Neidhardt
2020-11-30 22:30 ` Kyle Meyer
2020-12-01 9:10 ` Pierre Neidhardt [this message]
2020-12-01 16:26 ` zimoun
2020-11-17 15:01 ` zimoun
2020-11-18 4:55 ` Kyle Meyer
2020-11-18 8:17 ` zimoun
2020-11-17 15:39 ` Kyle Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kl5dh7j.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=help-guix@gnu.org \
--cc=kyle@kyleam.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.