unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Tomi Ollila <tomi.ollila@iki.fi>, Jani Nikula <jani@nikula.org>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by default with --client
Date: Mon, 28 Sep 2015 07:59:40 -0300	[thread overview]
Message-ID: <87wpva3j37.fsf@zancas.localnet> (raw)
In-Reply-To: <m21tepvpm5.fsf@guru.guru-group.fi>

Tomi Ollila <tomi.ollila@iki.fi> writes:


> if [ -n "$AUTO_DAEMON" -a -z "$CREATE_FRAME" ]; then
>     echo "$0: --auto-daemon is only applicable with --create-frame." >&2
>     exit 1       
> fi
>
> without this one may execute ./notmuch-emacs-mua --client --auto-daemon
> which yields starting emacs in daemon mode (in this example it is expected
> emacs is not running; otherwise --auto-daemon has no use in this example)
> -- but no ui to that newly-running emacs is provided. Similar behaviour
> can be observed by the following
>

I think what you propose is fine for a followup patch; note that the
scenario you worry about also needs --client to be a problem. Apparently
nothing is uncontroversial here, but if auto-daemon only works with
create frame, then perhaps the followup would be to have auto-daemon
imply create-frame

>>  
>> +# Kill the terminal/frame if we're creating one.
>> +if [ -z "$USE_EMACSCLIENT" -o -n "$CREATE_FRAME" -o -n "$NO_WINDOW" ]; then
>> +    ELISP="${ELISP} (setq message-exit-actions (list #'save-buffers-kill-terminal))"
>> +fi
>
> I am not very happy that message-exit-actions was added to $ELISP when
> not using emacsclient; when emacs is started its sole (initial) purpose is
> to serve mail sending (and not lending a frame in some other emacs) -- in
> this case it would be nice to be able to retrieve the sent mail buffer.

I'm somewhat less sympathetic here. AIUI, the goal of notmuch-emacs-mua
is to provide a drop in tool to replace mutt for sending mail in the
shell or from other programs. In this case, I think the most common
expectation is to terminate after sending mail (e.g. to return use of
the shell to the user, or allow the spawning program to continue).
However, it seems like this would be relatively easy to set up some
customization in notmuch-message-mode so that it could check if running
from the cli, and then either kill-or-not emacs depending on some
variable. So I think I'd like to keep the current behaviour as default,
and make it customizable at the emacs level.

  parent reply	other threads:[~2015-09-28 11:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-15  9:05 [PATCH v4 0/5] notmuch-emacs-mua updates Jani Nikula
2015-08-15  9:05 ` [PATCH v4 1/5] man: clean up notmuch-emacs-mua man page Jani Nikula
2015-08-15  9:05 ` [PATCH v4 2/5] notmuch-emacs-mua: support --no-window-system also for non-client Jani Nikula
2015-08-15  9:05 ` [PATCH v4 3/5] notmuch-emacs-mua: move --client option handling around Jani Nikula
2015-08-15  9:05 ` [PATCH v4 4/5] notmuch-emacs-mua: add --auto-daemon option to start Emacs daemon as needed Jani Nikula
2015-08-15  9:05 ` [PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by default with --client Jani Nikula
2015-08-26 19:03   ` Tomi Ollila
2015-08-28 18:22     ` Jani Nikula
2015-08-28 19:18       ` Tomi Ollila
2015-09-28 10:59     ` David Bremner [this message]
2015-09-29 19:18       ` Tomi Ollila
2015-09-30  6:13         ` Tomi Ollila
2015-09-29 11:28 ` [PATCH v4 0/5] notmuch-emacs-mua updates David Bremner

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=87wpva3j37.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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).