From 326b2ee494dc405a1535bffc21f31c91ad0da0e7 Mon Sep 17 00:00:00 2001 From: Lukasz Stelmach Date: Sat, 13 Dec 2014 22:54:10 +0100 Subject: [PATCH] Re: [PATCH] emacs: do not change users' mail agent configuration --- 6f/a23cc00778724beefa2a760e129e28eff36993 | 218 ++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 6f/a23cc00778724beefa2a760e129e28eff36993 diff --git a/6f/a23cc00778724beefa2a760e129e28eff36993 b/6f/a23cc00778724beefa2a760e129e28eff36993 new file mode 100644 index 000000000..4bb3082e1 --- /dev/null +++ b/6f/a23cc00778724beefa2a760e129e28eff36993 @@ -0,0 +1,218 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id D101D431FC0 + for ; Sat, 13 Dec 2014 13:54:23 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.001 +X-Spam-Level: +X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id iT9xvaR9TzK7 for ; + Sat, 13 Dec 2014 13:54:20 -0800 (PST) +Received: from smtpo.poczta.interia.pl (smtpo.poczta.interia.pl + [217.74.65.154]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CD71B431FB6 + for ; Sat, 13 Dec 2014 13:54:19 -0800 (PST) +X-Interia-R: Interia +X-Interia-R-IP: 89.65.17.18 +X-Interia-R-Helo: <[192.168.0.13]> +Received: from [192.168.0.13] (89-65-17-18.dynamic.chello.pl [89.65.17.18]) + (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by www.poczta.fm (INTERIA.PL) with ESMTPSA; + Sat, 13 Dec 2014 22:54:13 +0100 (CET) +Message-ID: <548CB582.4040807@poczta.fm> +Date: Sat, 13 Dec 2014 22:54:10 +0100 +From: Lukasz Stelmach +User-Agent: Mozilla/5.0 (X11; Linux x86_64; + rv:24.0) Gecko/20100101 Thunderbird/24.8.0 +MIME-Version: 1.0 +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: do not change users' mail agent configuration +References: <1418410466-26604-1-git-send-email-stlman@poczta.fm> + <87k31vqn1h.fsf@nikula.org> +In-Reply-To: <87k31vqn1h.fsf@nikula.org> +X-Enigmail-Version: 1.6 +Content-Type: multipart/signed; micalg=pgp-sha1; + protocol="application/pgp-signature"; + boundary="ncKFw1WNDiTR0l9uBgbTibrq7thAfUHno" +X-Interia-Antivirus: OK +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; + s=biztos; t=1418507657; + bh=i7gIN3tSTyu21pHIMc2mVsl3au3iddZxzgKXHzzhUrI=; + h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:Message-ID:Date:From: + User-Agent:MIME-Version:To:Subject:References:In-Reply-To: + X-Enigmail-Version:Content-Type:X-Interia-Antivirus; + b=BfBEkSdTnm96mUrPupzw7MjaiuCweld6/npVGJiSF3tEYxur08utj6iHea3GzoZ1b + REmiItDG7HCy6vtqlUzAF+OtIKmYEAwgC5qztcPFK+Dycf6ZzvsM4IWZKlfbuHDEL+ + JjNBVNQcZ01L27k9ZOBc0IHd8KnFzBTCNozvZRdo= +X-Mailman-Approved-At: Sun, 14 Dec 2014 02:51:22 -0800 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 13 Dec 2014 21:54:24 -0000 + +This is an OpenPGP/MIME signed message (RFC 4880 and 3156) +--ncKFw1WNDiTR0l9uBgbTibrq7thAfUHno +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +On 13.12.2014 22:04, Jani Nikula wrote: +> On Fri, 12 Dec 2014, =C5=81ukasz Stelmach wrote: +>> `mail-user-agent' is defined with defcustom and may be customised +>> by users. It should not be set to arbitrary values in modules. +>=20 +> Point taken. +>=20 +>> To make use of that configuration value call `compose-mail' which +>> starts user's preferred mail composition package as selected with +>> the variable `mail-user-agent' instead of notmuch's hardcoded +>> `message-mail'. +>=20 +> So your proposed change is that `notmuch-mua-mail` should start +> whichever mua the user has configured in `mail-user-agent` instead of +> the notmuch mail composition window, as described in the function +> documentation? I don't think I like that either. +>=20 +> Maybe we should let bind `mail-user-agent` instead? + + +Actually `message-mail` isn't a "notmuch mail composition window" but +rather a "mail composition window" implemented in message.el which is a +part of Emacs. Even more, it is the default "mail composition window" +in Emacs because the default value of `mail-user-agent`, as defined in +simple.el, is `message-user-agent` (since Emacs 23.3 as described in a +comment in `compose-mail` function therein) which causes to be launched b= +y +`compose-mail`. + +TL;DR with the mail-user-agent variable set to the default value nothing + changes for a notmuch user. + +>> --- +>> NEWS | 10 ++++++++++ +>> emacs/notmuch-mua.el | 2 +- +>> emacs/notmuch.el | 2 -- +>> 3 files changed, 11 insertions(+), 3 deletions(-) +>> +>> diff --git a/NEWS b/NEWS +>> index 44e8d05..cf5b3c3 100644 +>> --- a/NEWS +>> +++ b/NEWS +>> @@ -64,6 +64,16 @@ Added `notmuch address` subcommand +>> Emacs Interface +>> --------------- +>> =20 +>> +Fixed `mail-user-agent` handling +>> + +>> + The value of the mail-user-agent variable is not forcibly set to +>> + `notmuch-user-agent`, regardles of how a user has customised it, +>> + everytime notmuch.el is loaded. This way, someone who used for exam= +ple +>> + Gnus has her MUA and notmuch just as a search engine, doesn't have = +her +>> + configuration broken everytime notmuch.el is loaded. The user can n= +ow +>> + use her favourite mail composing package when replying messages in +>> + notmuch too. +>=20 +> I understand you're annoyed at the current behaviour, but please don't +> pour that annoyance into notmuch NEWS. Thank you. + +It wasn't my intention. I wasn't even sure I should add to NEWS anything +at all but the "Contributing" page says to update NEWS if a change is +user visible. Considering what I wrote above, do you think it is visible?= + + +=20 +> BR, +> Jani. +>=20 +>=20 +>> + +>> Use the `j` key to access saved searches from anywhere in notmuch +>> =20 +>> `j` is now globally bound to `notmuch-jump`, which provides fast, +>> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +>> index 2c58886..f02c7b5 100644 +>> --- a/emacs/notmuch-mua.el +>> +++ b/emacs/notmuch-mua.el +>> @@ -263,7 +263,7 @@ OTHER-ARGS are passed through to `message-mail'." +>> (push (cons 'From (concat +>> (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) = +other-headers)) +>> =20 +>> - (apply #'message-mail to subject other-headers other-args) +>> + (apply #'compose-mail to subject other-headers other-args) +>> (message-sort-headers) +>> (message-hide-headers) +>> (set-buffer-modified-p nil) +>> diff --git a/emacs/notmuch.el b/emacs/notmuch.el +>> index 218486a..80cab57 100644 +>> --- a/emacs/notmuch.el +>> +++ b/emacs/notmuch.el +>> @@ -1037,8 +1037,6 @@ notmuch buffers exist, run `notmuch'." +>> (switch-to-buffer first)) +>> (notmuch)))) +>> =20 +>> -(setq mail-user-agent 'notmuch-user-agent) +>> - +>> (provide 'notmuch) +>> =20 +>> ;; After provide to avoid loops if notmuch was require'd via notmuch-= +init-file. +>> --=20 +>> 2.0.4 +>> +>> _______________________________________________ +>> notmuch mailing list +>> notmuch@notmuchmail.org +>> http://notmuchmail.org/mailman/listinfo/notmuch +>=20 + + +--=20 +By=C5=82o mi bardzo mi=C5=82o. Twoje oczy lubi=C4=85 mn= +ie +>=C5=81ukasz< i to mnie zgubi (c)SNL= + + +REKLAMA: http://ars-fabrica.eu/ sklep z r=C4=99kodzie=C5=82em + + +--ncKFw1WNDiTR0l9uBgbTibrq7thAfUHno +Content-Type: application/pgp-signature; name="signature.asc" +Content-Description: OpenPGP digital signature +Content-Disposition: attachment; filename="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 +Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ + +iQEcBAEBAgAGBQJUjLWCAAoJEAC2l2xjkdNxPPUIAK7AkzXhtzZvblz29RnvmiNU +FDTpf3RxmqDNCuUcQ6ZumPZbyrgHTtIPAiOVEv+KFH2oIZDbJDGmwKl6bAkWqboP +S+WJbkLqXK5R4pFqEAuE68sZMXjOc861qpsadHC1RX/Cys4K+ULhNljpcmCTkUpL +AVUJcPOdigjYANlqA+4TwAHMnfOONVLHJfv/K5r9E/D1vqW3cVCg2acD2v1mZOma +3y1aR6OA2JPd0tZZxB13emHCr89QFYOF3O5yPvk4lr1mApUt7leZZJpfZTjS6N6+ +2Jc7KZY8jjagB6j5jl6LT/XMahXa4v//tQTh+FTCoPLkenee9PFxgS3iAm6ZiWI= +=kyaC +-----END PGP SIGNATURE----- + +--ncKFw1WNDiTR0l9uBgbTibrq7thAfUHno-- -- 2.26.2