GNU bug report logs - #45357
[PATCH] * lisp/man.el (Man-getpage-in-background): always use shell-file-name

Previous Next

Package: emacs;

Reported by: Nika Otiashvili <nikaoto <at> gmail.com>

Date: Mon, 21 Dec 2020 20:42:02 UTC

Severity: normal

Tags: notabug, patch

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 45357 <at> debbugs.gnu.org (full text, mbox):

From: Nika Otiashvili <nikaoto <at> gmail.com>
To: eliz <at> gnu.org
Cc: michael.albinus <at> gmx.de, 45357 <at> debbugs.gnu.org
Subject: Re: bug#45357: [PATCH] * lisp/man.el (Man-getpage-in-background):
 always use shell-file-name
Date: Wed, 23 Dec 2020 04:55:41 +0400
Hello,

Thanks for looking at the patch, Eli.

Regarding the rc files, it seems there was an error on my part.
I have (setq shell-command-switch "-cl") in my .emacs. The "-l" flag
runs sh as a login shell, thus it loads my .profile. From there I source my
.bashrc. Since I have bashisms in my .bashrc, sh simply sees them
as syntax errors and exits. I should have inserted a check of $0 inside my
.profile to prevent this.

> OTOH, every Posix system I know about does have /bin/sh, so I'm
> curious what kind of system did you see where /bin/sh is absent.

Initially, I thought Windows users wouldn't have /bin/sh, but the cygwin
and windows-nt checks I removed accounted for that and used
shell-file-name instead of sh.

So, I've concluded that the first two reasons described in my patch
are irrelevant and the last one is indeed very weak. I believe my
patch would not benefit anyone and it only solves a specific problem I
had with my
configuration.

Regards,
Nika Otiashvili

On Tue, Dec 22, 2020 at 10:50 PM Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> Hi,
>
> > My problem is more a conceptual one: it is not trivial to replace
> > /bin/sh with any other shell, because they work differently.  The
> > command in question builds a complex shell command to run, and it
> > isn't obvious that any user shell will be able to run it.
>
> That's true. But we could require that shell-file-name points to a Posix
> shell, if used in man.el.
>
> Btw, if we were to change man.el, I'd rather propose to use
> start-process-shell-command, instead of composing the command manually.
>
> > Could you please elaborate on the specific problems you had and tell
> > more about your system configuration where you bumped into these
> > problems?
>
> This question still stands, yes.
>
> > Thanks.
>
> Best regards, Michael.




This bug report was last modified 4 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.