help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Workflow with mu4e + magit for sending patchsets to guix?


From: zimoun
Subject: Re: Workflow with mu4e + magit for sending patchsets to guix?
Date: Wed, 25 Nov 2020 13:33:46 +0100

Hi Pierre,

Thanks!

On Wed, 25 Nov 2020 at 10:19, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> --8<---------------cut here---------------start------------->8---
> (defvar ambrevar/known-mailing-list-archives
>   '(("help-guix@gnu.org" . "guix-user")
>     ("guix-devel@gnu.org" . "guix-devel")
>     ("guix-bugs" . "guix-bugs")
>     ("guix-patches" . "guix-patches"))
>   "Alist of mail adresses and their Yhetil name.")
>
> (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)))
>          (mailing-list
>           (cdr (seq-find
>                 (lambda (pair)
>                   (member (car pair) all-addresses))
>                 ambrevar/known-mailing-list-archives))))
>     (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))
> --8<---------------cut here---------------end--------------->8---

Neat!  It fails for Bugs/Patches since the addresses are
12345@debbugs.gnu.org.  So the “all-addresses” should be a bit smarter.
But, anyway because I do not use yhetil to refer to Bug/Patch but
issues.guix.gnu.org.


Cheers,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]