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>, Robert Ewald <robewald@gmx.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: Make the shell location configurable
Date: Thu, 17 Aug 2017 15:15:21 +0300	[thread overview]
Message-ID: <m2ziaycrvq.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87shgqh0zo.fsf@tethera.net>

On Thu, Aug 17 2017, David Bremner wrote:

> Robert Ewald <robewald@gmx.net> writes:
>
>>> On 16 Aug 2017, at 13:09, David Bremner <david@tethera.net> wrote:
>>> 
>>> Robert Ewald <robewald@gmx.net> writes:
>>> 
>>>>> On 16 Aug 2017, at 01:38, David Bremner <david@tethera.net> wrote:
>>> 
>>>> I did some research: apparently shell-file-name should be POSIX compatible,
>>>> otherwise many plugins don't work. explicit-shell-file-name however can be set to
>>>> fish or tcsh if you want to use that in M-x shell.
>>>> 
>>> 
>>> Is the requirement for shell-file-name to be POSIX compatible documented
>>> somewhere in the emacs documentation?
>>
>> Not that I could find.
>>
>> Robert
>
> OK, then I think we'd better be conservative in notmuch. Anecdotally I
> think it is set to some *csh on BSD variants and (!) cmd.exe on windows
> by default. We don't want people to have to change a default global
> setting to use notmuch.  I believe there is work in progress to support
> 'make-process' which is new in emacs25, and would eliminate the need for
> a shell wrapper there.

The effective line

/bin/sh -c ' exec 2>"$1"; shift; exec "$0" "$@" ' args...

Is neat trick (created by Austin, I[I]RC 2013-05) to have the command started
from emacs redirect stderr to a file while preserving argument list.
Before that we sometimes got errors intermixed to the output and sexp
parsing failed. I tried an alternative --stderr=FILE patch to notmuch,
which was applied, and then reverted by followup patch from me -- it
was useless as using that e.g. in remote notmuch use would have written
stderr on *remote* system and not locally. 

I tested what shell-file-name is defined by default on a freebsd KVM
instance -- it is /bin/csh -- and /bin/csh -c ' exec 2>"$1" '; does not work.

Many of have to host private patches to get their things work on their
"niche" ;) operating environments. Until (and if) emacs 25 make-process
approach is feasible, perhaps you have to host your own there.

Anyway, it is nice to see use of notmuch in many alternative systems, keep
up the good work!

Tomi

>
> d

  reply	other threads:[~2017-08-17 12:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 22:36 [PATCH] emacs: Make the shell location configurable Robert Ewald
2017-08-15 13:53 ` Tomi Ollila
2017-08-15 16:02 ` David Bremner
2017-08-15 20:04   ` Robert Ewald
2017-08-15 23:38     ` David Bremner
2017-08-16  7:17       ` Robert Ewald
2017-08-16 11:09         ` David Bremner
2017-08-16 20:16           ` Robert Ewald
2017-08-17 11:44             ` David Bremner
2017-08-17 12:15               ` Tomi Ollila [this message]
2017-08-17 21:46               ` 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=m2ziaycrvq.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=robewald@gmx.net \
    /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).