From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Mumi now uses raw emails and Mu Date: Tue, 23 Jul 2019 13:01:58 +0200 Message-ID: <875zntc8ux.fsf@elephly.net> References: <87ef2jdtuc.fsf@elephly.net> <87blxme6pk.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45890) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpsYY-0003Un-P2 for guix-devel@gnu.org; Tue, 23 Jul 2019 07:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpsYX-0004M7-J8 for guix-devel@gnu.org; Tue, 23 Jul 2019 07:02:06 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21307) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpsYX-0004L2-40 for guix-devel@gnu.org; Tue, 23 Jul 2019 07:02:05 -0400 In-reply-to: <87blxme6pk.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Jack Hill Cc: guix-devel@gnu.org Ricardo Wurmus writes: > Forking Mu requires a rough understanding how it currently works. > Obviously, it must parse emails and extract certain headers. We only > need it to extract a few more headers such as =E2=80=9CX-Debbugs-Envelope= -To=E2=80=9D, > which contains the Debbugs bug number. (I don=E2=80=99t know if that hea= der is > set for *all* emails that end up in the bug tracker, but that=E2=80=99s > something we have to figure out.) > > Mu is written in C and the header extraction probably happens in the C > code as well. I forked Mu and let it store the =E2=80=9CX-Debbugs-Envelope-To=E2=80=9D he= ader in the database: https://git.elephly.net/?p=3Dsoftware/mumimu.git;a=3Dshortlog;h=3Drefs/= heads/mumimu The =E2=80=9Cbugid=E2=80=9D query can be used to quickly retrieve messages = belonging to a certain Debbugs bug, so something like this will print the message subject for all messages relating to bug 31023. (use-modules (mumimu)) (mu:initialize (%config 'mail-dir)) (for-each (lambda (msg) (pk (mu:subject msg))) (mu:message-list "bugid:31023")) This seems to actually work. Still don=E2=80=99t know if all emails actual= ly have that header; if they don=E2=80=99t we=E2=80=99ll need to implement an = alternative way to get the bug number in =E2=80=9Cget_bugid=E2=80=9D (lib/mu-msg-file.c= ). -- Ricardo