From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 508366DE0183 for ; Thu, 17 Aug 2017 05:15:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.49 X-Spam-Level: X-Spam-Status: No, score=0.49 tagged_above=-999 required=5 tests=[AWL=-0.162, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 004iQA5YRfLX for ; Thu, 17 Aug 2017 05:15:37 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 00DAA6DE010F for ; Thu, 17 Aug 2017 05:15:36 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id B655B100090; Thu, 17 Aug 2017 15:15:21 +0300 (EEST) From: Tomi Ollila To: David Bremner , Robert Ewald Cc: notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: Make the shell location configurable In-Reply-To: <87shgqh0zo.fsf@tethera.net> References: <20170814223623.28411-1-robewald@gmx.net> <87fucsom30.fsf@tesseract.cs.unb.ca> <1B88EBF6-A978-4723-AAF4-7063EF36222B@gmx.net> <874lt8jtak.fsf@tethera.net> <57061C6E-AF81-4C8B-9BA8-62747BB1806D@gmx.net> <87shgrixbl.fsf@tethera.net> <09F689B4-A734-4452-8E40-0468C5999B9B@gmx.net> <87shgqh0zo.fsf@tethera.net> User-Agent: Notmuch/0.25+26~ge420d51 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Thu, 17 Aug 2017 12:15:38 -0000 On Thu, Aug 17 2017, David Bremner wrote: > Robert Ewald writes: > >>> On 16 Aug 2017, at 13:09, David Bremner wrote: >>> >>> Robert Ewald writes: >>> >>>>> On 16 Aug 2017, at 01:38, David Bremner 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