Re: [PATCH] emacs: do not change users' mail agent configuration
[notmuch-archives.git] / ef / 2dfa6c32f164a992cf1caa05788380d6e9a79c
diff --git a/ef/2dfa6c32f164a992cf1caa05788380d6e9a79c b/ef/2dfa6c32f164a992cf1caa05788380d6e9a79c
new file mode 100644 (file)
index 0000000..524a956
--- /dev/null
@@ -0,0 +1,183 @@
+Return-Path: <stlman@poczta.fm>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1A1D8431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 14 Dec 2014 15:49:37 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.001\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id SuzdKh+9rxTi for <notmuch@notmuchmail.org>;\r
+       Sun, 14 Dec 2014 15:49:33 -0800 (PST)\r
+Received: from smtpo.poczta.interia.pl (smtpo.poczta.interia.pl\r
+       [217.74.65.157])\r
+       (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 968C9431FAF\r
+       for <notmuch@notmuchmail.org>; Sun, 14 Dec 2014 15:49:33 -0800 (PST)\r
+X-Interia-R: Interia\r
+X-Interia-R-IP: 89.65.17.18\r
+X-Interia-R-Helo: <[192.168.0.13]>\r
+Received: from [192.168.0.13] (89-65-17-18.dynamic.chello.pl [89.65.17.18])\r
+       (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by www.poczta.fm (INTERIA.PL) with ESMTPSA;\r
+       Mon, 15 Dec 2014 00:49:29 +0100 (CET)\r
+Message-ID: <548E21FD.4040307@poczta.fm>\r
+Date: Mon, 15 Dec 2014 00:49:17 +0100\r
+From: Lukasz Stelmach <stlman@poczta.fm>\r
+User-Agent: Mozilla/5.0 (X11; Linux x86_64;\r
+       rv:24.0) Gecko/20100101 Thunderbird/24.8.0\r
+MIME-Version: 1.0\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: do not change users' mail agent configuration\r
+References: <1418410466-26604-1-git-send-email-stlman@poczta.fm>\r
+       <87k31vqn1h.fsf@nikula.org> <548CB582.4040807@poczta.fm>\r
+       <87h9wyr2bb.fsf@nikula.org>\r
+In-Reply-To: <87h9wyr2bb.fsf@nikula.org>\r
+X-Enigmail-Version: 1.6\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+       protocol="application/pgp-signature";\r
+       boundary="xiub7qWL4WWHAfQqvouWvKPSQIVorrv4x"\r
+X-Interia-Antivirus: OK\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl;\r
+       s=biztos; t=1418600970;\r
+       bh=hiXHmWWNKHd+WVUR/R78+H63XFdUv9+wOxYJqkvQrbU=;\r
+       h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:Message-ID:Date:From:\r
+       User-Agent:MIME-Version:To:Subject:References:In-Reply-To:\r
+       X-Enigmail-Version:Content-Type:X-Interia-Antivirus;\r
+       b=CMsX+TxabkXmrItKrlFfTTY2k/qYa04e7V6/BqOnDGE6A+TZz+xbWzao/g0pSQAM7\r
+       +I/1U6P3pqqW8U0gO4+nub55tRX1wDVufDKsONQUpP6CISeczf8ejHzwwob/8S/Zfd\r
+       KLQUgns+3SbqDIN1L+/XX0qHxTAC6K0I66sgKjI4=\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 14 Dec 2014 23:49:37 -0000\r
+\r
+This is an OpenPGP/MIME signed message (RFC 4880 and 3156)\r
+--xiub7qWL4WWHAfQqvouWvKPSQIVorrv4x\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 14.12.2014 10:46, Jani Nikula wrote:\r
+> On Sat, 13 Dec 2014, Lukasz Stelmach <stlman@poczta.fm> wrote:\r
+>> On 13.12.2014 22:04, Jani Nikula wrote:\r
+>>> On Fri, 12 Dec 2014, =C5=81ukasz Stelmach <stlman@poczta.fm> wrote:\r
+>>>> `mail-user-agent' is defined with defcustom and may be customised\r
+>>>> by users. It should not be set to arbitrary values in modules.\r
+>>>\r
+>>> Point taken.\r
+>>>\r
+>>>> To make use of that configuration value call `compose-mail' which\r
+>>>> starts user's preferred mail composition package as selected with\r
+>>>> the variable `mail-user-agent' instead of notmuch's hardcoded\r
+>>>> `message-mail'.\r
+>>>\r
+>>> So your proposed change is that `notmuch-mua-mail` should start\r
+>>> whichever mua the user has configured in `mail-user-agent` instead of=\r
+\r
+>>> the notmuch mail composition window, as described in the function\r
+>>> documentation? I don't think I like that either.\r
+>>>\r
+>>> Maybe we should let bind `mail-user-agent` instead?\r
+>>\r
+>>\r
+>> Actually `message-mail` isn't a "notmuch mail composition window" but\r
+>> rather a "mail composition window" implemented in message.el which is =\r
+a\r
+>> part of Emacs.  Even more, it is the default "mail composition window"=\r
+\r
+>> in Emacs because the default value of `mail-user-agent`, as defined in=\r
+\r
+>> simple.el, is `message-user-agent` (since Emacs 23.3 as described in a=\r
+\r
+>> comment in `compose-mail` function therein) which causes to be launche=\r
+d by\r
+>> `compose-mail`.\r
+>=20\r
+> Basically notmuch layers its own stuff on top of message mode.\r
+\r
+I need to dig into notmuch-mua a little bit deeper but at the first\r
+glance it doesn't seem that what I want is impossible. What I want is:\r
+\r
+- keep notmuch working as it is for everyone who uses it now,\r
+\r
+- enable clean integration with other MUAs for those who don't use it\r
+  yet.\r
+\r
+The second point is very important for me because I use Gnus for\r
+incoming mail but notmuch is definitely better for browsing archives\r
+and I'd love to use it.\r
+\r
+>> TL;DR with the mail-user-agent variable set to the default value nothi=\r
+ng\r
+>>       changes for a notmuch user.\r
+>=20\r
+> Except `message-user-agent` gets used instead of `notmuch-user-agent`\r
+> which does the layering on top. We currently don't do much more, but\r
+> might in the future. As an example, `notmuch-mua-send-hook` won't get\r
+> called.\r
+\r
+Indeed I need to sit down and draw it all.\r
+\r
+> Another question open to debate is, if the user is using the notmuch\r
+> interface, and calls a function named `notmuch-mua-new-mail` to compose=\r
+\r
+> mail, should the function respect `mail-user-agent` and pop up a\r
+> non-notmuch interface? Basically what we do is tested to work on top of=\r
+\r
+> message mode only, so all bets would be off anyway.\r
+\r
+And that should be kept as default. I, on the other hand have tested,\r
+replying from notmuch with Gnus (which is also works on top of message)\r
+and as far as I can tell it works fine. I don't say notmuch has to work\r
+with all possible user agents, I just want it to be able to work with\r
+more than one.\r
+\r
+I will keep investigating the issue.\r
+\r
+BTW There is also the `read-mail-command` variable in simple.el which\r
+which might need some of our attention.\r
+\r
+Kind regards,\r
+--=20\r
+By=C5=82o mi bardzo mi=C5=82o.                   Twoje oczy lubi=C4=85 mn=\r
+ie\r
+>=C5=81ukasz<                                     i to mnie zgubi  (c)SNL=\r
+\r
+\r
+\r
+--xiub7qWL4WWHAfQqvouWvKPSQIVorrv4x\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+Content-Disposition: attachment; filename="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/\r
+\r
+iQEcBAEBAgAGBQJUjiIFAAoJEAC2l2xjkdNxa4AIAIUh9AbpyM2ZeTGiCO33/dZD\r
+cJ1bHkjWnQNZ/80pS9B9AGfaBVOue07XV3p/KQQVbKAYaXYhHwRpVozrIPqVoSdh\r
+svM0FbAK+A7u65bk2gnDy6H489fhHMZcewQXwOkcYdiaTrZ9sLgvE/U1wf3PNsv2\r
+4ROt0jYxm/1k+OwIJNnoIok8jajtv3JjzUyASQfMQjuMz8aEG6SOs97eRCvUGtzW\r
+0rFwymCfV/C4lXeMCU3WL42FyLrCLDc2Ws5CbLdhbqNkhndedJn18cseGCd/jiDr\r
+/4Ink9JIWLoP5WJM52BwONFD009CG38Yq4N5ar9Ax3HNmzhCXRJJSCMUxAPP4bs=\r
+=BRGt\r
+-----END PGP SIGNATURE-----\r
+\r
+--xiub7qWL4WWHAfQqvouWvKPSQIVorrv4x--\r