unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>,
	notmuch@notmuchmail.org, Jani Nikula <jani@nikula.org>
Subject: Re: [DRAFT PATCH v2] modified notmuch-emacs-mua v2
Date: Wed, 21 Jan 2015 11:38:19 +0200	[thread overview]
Message-ID: <m2y4owwk1g.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87ppa9xor8.fsf@maritornes.cs.unb.ca>

On Tue, Jan 20 2015, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> This is second draft patch of (first being)
>>
>> id:1405026779-29966-1-git-send-email-tomi.ollila@iki.fi
>>
>> I saw potential problem with only supporting emacsclient(1) in
>> the version David sent:
>> id:1421598115-4889-1-git-send-email-david@tethera.net
>>
>> (no emacs server running and no tty -- new X client not started)
>>
>
> I don't understand what use case is failing for you. I think I tested
> all 4 combinations of DISPLAY set and unset and emacs server running and
> not running.  Do you somehow want to run the notmuch-emacs-mua script
> from a process not attached to a terminal (from cron?).

It seems that you have done good testing and I just failed to test using
exactly the same options you have:

emacsclient -c -a '' .zshrc

Works as one'd expect to work successfully in all cases, DISPLAY set/unset
and emacs-server running or not (now deleting 6 lines of text below that
was based on wrong assumtions...)

// 6 lines of text deleted ... :) //

So, the question goes into deciding whether the magic of starting emacs
server to the user if it is not running -- something that many users would
not anticipate/desire (I am one of those)...

Running emacs via emacsclient has subtle differences to just running emacs
the "regular" way -- while testing I just had problems exiting the
emacsclient session without exiting the whole emacs -- I exited the whole
emacs and next time paid attention to minibuffer message saying c-x 5 0
exits the session...
Now that I got the tests work as David would have expected me to do those,
the frame emacs started looked different that my emacs frames have when
starting "normally" -- there was extra toolbar in the frame (I have
inhibited all menu and toolbars in my normal setup). Just that it behaves
differently is suspicious.

Therefore, IMO it is clearer to run "regular" emacs unless user is
explicitly running emacs-server and can anticipate the behaviour
differences when running emacsclient there.


>> In case emacsclient(1) is used and no --no-window-system, '-c' arg is
>> given to emacsclient like in the version David sent.
>>
>> (this means that if emacs is not running on X, user may get this message:
>>  "emacsclient: could not get terminal name" -- we need to document user
>>  to give -nw (--no-window-system) option then)
>
> As I wrote above, I'm missing what the tradeoff is. The version I sent
> works fine (at least for me) in the case where DISPLAY is not set and
> --no-window-system is not given (i.e. it's implied if DISPLAY is not
> set).

Ok, my tests failed colossally here. Sorry. First, I forgot to have
-a '' there (for comparison) and secondly I closed stdout before
running emacsclient (bug in the script). 

That's what you get after almost 3 hours of vigorous hacking there; the
manual test coverage is probably not the best possible...

>
> d

Tomi

  reply	other threads:[~2015-01-21  9:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 19:25 [PATCH] cli: add a tool for starting new message in the emacs ui Jani Nikula
2014-03-19 21:24 ` Tomi Ollila
2014-03-19 21:54   ` Jani Nikula
2014-03-20 10:31     ` Tomi Ollila
2014-04-06 15:43       ` [PATCH v2] " Jani Nikula
2014-04-07  3:59         ` Jameson Graef Rollins
2014-07-01 20:02         ` [PATCH] " David Bremner
2014-07-04 17:36           ` Tomi Ollila
2015-01-18 16:21           ` David Bremner
2015-01-18 21:07             ` Tomi Ollila
2015-01-19 16:32             ` Tomi Ollila
2015-01-20 17:53             ` [DRAFT PATCH v2] modified notmuch-emacs-mua v2 Tomi Ollila
2015-01-20 18:58               ` David Bremner
2015-01-21  9:38                 ` Tomi Ollila [this message]
2015-01-21 16:50                   ` David Bremner
2015-02-22 20:34             ` [PATCH] cli: add a tool for starting new message in the emacs ui David Bremner
2015-03-06  7:06               ` 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=m2y4owwk1g.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    /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).