all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nika Otiashvili <nikaoto@gmail.com>
To: eliz@gnu.org
Cc: michael.albinus@gmx.de, 45357@debbugs.gnu.org
Subject: bug#45357: [PATCH] * lisp/man.el (Man-getpage-in-background): always use shell-file-name
Date: Wed, 23 Dec 2020 04:55:41 +0400	[thread overview]
Message-ID: <CAHJNDzd_Hab69siH25=58sC4vhzLsw_Zdk-X-Ct8hrSmi5TP8A@mail.gmail.com> (raw)
In-Reply-To: <87a6u565gi.fsf@gmx.de>

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@gmx.de> wrote:
>
> Eli Zaretskii <eliz@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.





  reply	other threads:[~2020-12-23  0:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 19:24 bug#45357: [PATCH] * lisp/man.el (Man-getpage-in-background): always use shell-file-name Nika Otiashvili
2020-12-22 15:14 ` Eli Zaretskii
2020-12-22 18:50   ` Michael Albinus
2020-12-23  0:55     ` Nika Otiashvili [this message]
2020-12-23  8:17       ` Michael Albinus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHJNDzd_Hab69siH25=58sC4vhzLsw_Zdk-X-Ct8hrSmi5TP8A@mail.gmail.com' \
    --to=nikaoto@gmail.com \
    --cc=45357@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.