From: Jani Nikula Date: Sat, 13 Dec 2014 21:04:26 +0000 (+0200) Subject: Re: [PATCH] emacs: do not change users' mail agent configuration X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=56f725a5e0b65bcb13095530996cc16020dbd962;p=notmuch-archives.git Re: [PATCH] emacs: do not change users' mail agent configuration --- diff --git a/b1/2f4814466d85c62100c4fc095c9c5461571f0c b/b1/2f4814466d85c62100c4fc095c9c5461571f0c new file mode 100644 index 000000000..a25da4bfa --- /dev/null +++ b/b1/2f4814466d85c62100c4fc095c9c5461571f0c @@ -0,0 +1,160 @@ +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 7E4C0431FC0 + for ; Sat, 13 Dec 2014 13:04:26 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 OVOPu+CDdQ8A for ; + Sat, 13 Dec 2014 13:04:23 -0800 (PST) +Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com + [74.125.82.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 1A6F4431FB6 for ; Sat, 13 Dec 2014 13:04:23 -0800 + (PST) +Received: by mail-wg0-f42.google.com with SMTP id z12so11700640wgg.1 + for ; Sat, 13 Dec 2014 13:04:22 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type + :content-transfer-encoding; + bh=HdS/IysqM1EiMVrJYa9uceX/2fJMEnTiyhBqB5fVwOw=; + b=InFBznqRnLeHPEngVWBU3USkERqNiNEQPXDwxCTjdSHVlAQi/BqgHWFKdM4PA4d6OT + 2cWVqDr7poTT4DR6TZR7LilVZMIuy6mPkMVXbRVbux2E6IznETPfDtoPVK+av3CoaqXo + 9UgQAO4bvLpedluhRb5Ts9JDDBjQVwS6XEnU4R/r0or8vU+qZy/9VJsLsnzY2/sJ0Ou6 + 8TjU7kKQZ5vssZ3uWxT6AjJwV14/hBX1JhTnQZPgTvyqU38i7RruPOIniLMzbAFUPeWD + NLBzmH9NBn4yyCmZvmwluptstE1sqXiuNnrm9eAnaVf2fh1Q5Ll3FZJo2/1okCMQdy6f + Qc6A== +X-Gm-Message-State: + ALoCoQnM4U9nV5B5+9uV4qj5CxfVPZBSqRpSTEFgLNLuvGcfhy8hlLC6+S2+iHZ7AW8ro/hBF47b +X-Received: by 10.194.8.232 with SMTP id u8mr12506743wja.47.1418504661883; + Sat, 13 Dec 2014 13:04:21 -0800 (PST) +Received: from localhost (dsl-hkibrasgw2-58c37d-174.dhcp.inet.fi. + [88.195.125.174]) + by mx.google.com with ESMTPSA id bj3sm6943750wib.3.2014.12.13.13.04.20 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 13 Dec 2014 13:04:21 -0800 (PST) +From: Jani Nikula +To: =?utf-8?Q?=C5=81ukasz?= Stelmach , + notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: do not change users' mail agent configuration +In-Reply-To: <1418410466-26604-1-git-send-email-stlman@poczta.fm> +References: <1418410466-26604-1-git-send-email-stlman@poczta.fm> +User-Agent: Notmuch/0.19+3~g7585e8c (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Sat, 13 Dec 2014 23:04:26 +0200 +Message-ID: <87k31vqn1h.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +Cc: =?utf-8?Q?=C5=81ukasz?= Stelmach +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:04:26 -0000 + +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. + +Point taken. + +> 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'. + +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. + +Maybe we should let bind `mail-user-agent` instead? + +> --- +> 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=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 example +> + 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 now +> + use her favourite mail composing package when replying messages in +> + notmuch too. + +I understand you're annoyed at the current behaviour, but please don't +pour that annoyance into notmuch NEWS. Thank you. + +BR, +Jani. + + +> + +> Use the `j` key to access saved searches from anywhere in notmuch +>=20=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) ">")) oth= +er-headers)) +>=20=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=20 +> -(setq mail-user-agent 'notmuch-user-agent) +> - +> (provide 'notmuch) +>=20=20 +> ;; After provide to avoid loops if notmuch was require'd via notmuch-ini= +t-file. +> --=20 +> 2.0.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch