Subject: Re: bug#75308: 30.0.93; man.el assume shell is bash

From: Eli Zaretskii <[email-masked]>
Date: Fri, 03 Jan 2025 10:50:56 +0200

> Cc: Michael Albinus <[email-masked]>
> From: Stefan Kangas <[email-masked]>
> Date: Fri, 3 Jan 2025 02:46:28 -0600
> 
> Ted Phelps <[email-masked]> writes:
> 
> > Steps to reproduce:
> > * env SHELL=/bin/tcsh emacs -Q
> > * invoke M-x man
> > * request a man page (e.g. emacs)
> >
> > This will produce output like the following instead of the man page:
> >
> >     Unmatched '''.
> >     BEGIN: Command not found.
> >     anonblank=0: Command not found.
> >     }: Command not found.
> >     Illegal variable name.
> >     {: Command not found.
> >     }: Command not found.
> >     Illegal variable name.
> >     Badly placed ()'s.
> >     Unmatched '''.
> >
> >     process exited abnormally with code 1
> >
> > Replacing /bin/tcsh with /bin/bash in the above command produces the
> > expected man page.
> >
> > It looks like the behavior was broken by the following commit:
> >
> >     commit 861ac933dd8aed1028edc4b9142400e3702874d5
> >     Author: Michael Albinus <[email-masked]>
> >     Date:   Wed Nov 1 16:54:31 2023 +0100
> >
> > Many thanks,
> > -Ted
> 
> Thanks for the bug report.  For emacs-30, we should look into a some
> small workaround.  I'm copying in Michae.

I think we should force SHELL to be 'sh' (except on Windows) before
calling shell-command etc.