unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: "Łukasz Stelmach" <stlman@poczta.fm>, notmuch@notmuchmail.org
Cc: "Łukasz Stelmach" <stlman@poczta.fm>
Subject: Re: [PATCH] emacs: do not change users' mail agent configuration
Date: Sat, 13 Dec 2014 23:04:26 +0200	[thread overview]
Message-ID: <87k31vqn1h.fsf@nikula.org> (raw)
In-Reply-To: <1418410466-26604-1-git-send-email-stlman@poczta.fm>

On Fri, 12 Dec 2014, Łukasz Stelmach <stlman@poczta.fm> 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
>  ---------------
>  
> +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
>  
>    `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))
>  
> -  (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))))
>  
> -(setq mail-user-agent 'notmuch-user-agent)
> -
>  (provide 'notmuch)
>  
>  ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file.
> -- 
> 2.0.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2014-12-13 21:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 18:54 [PATCH] emacs: do not change users' mail agent configuration Łukasz Stelmach
2014-12-13 21:04 ` Jani Nikula [this message]
2014-12-13 21:54   ` Lukasz Stelmach
2014-12-14  9:46     ` Jani Nikula
2014-12-14 23:49       ` Lukasz Stelmach
2017-08-23 13:40         ` Importing notmuch should not change user configuration David Bremner
  -- strict thread matches above, loose matches on Subject: below --
2017-08-23 12:07 Christoph Groth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k31vqn1h.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    --cc=stlman@poczta.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).