unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Schroeder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dmitry@gutov.dev, 66338@debbugs.gnu.org
Subject: bug#66338: 30.0.50; grep-commnd set and using an old fish results in empty Copyright files
Date: Thu, 05 Oct 2023 09:13:47 +0200	[thread overview]
Message-ID: <877co1h784.fsf@alexschroeder.ch> (raw)
In-Reply-To: <83zg0x4p9a.fsf@gnu.org> (message from Eli Zaretskii on Thu, 05 Oct 2023 08:22:41 +0300)

Eli Zaretskii <eliz@gnu.org> writes:

> The Emacs manual says:
>
>   ‘SHELL’
>        The name of an interpreter used to parse and execute programs run
>        from inside Emacs.  This is used to initialize the variable
>        ‘shell-file-name’ (*note Single Shell::).
>
> So Emacs expects this variable to point to a shell that Emacs can use
> to run programs, not your interactive shell.  If you want a different
> shell to be used in interactive shell sessions, such as "M-x shell",
> then you should use the variable explicit-shell-file-name to point to
> that other shell (in your case, fish).

I understand that this is what Emacs expects. It seems to me that other
parts of a user’s system might go against this expectation, however. The
man page for login(1) says this, for example:

       Your user and group ID will be set according to their values in
       the /etc/passwd file. The value for $HOME, $SHELL, $PATH,
       $LOGNAME, and $MAIL are set according to the appropriate fields
       in the password entry. Ulimit, umask and nice values may also be
       set according to entries in the GECOS field.

That is to say, if a users runs chsh(1) and decides to use fish, then
SHELL is set to fish, it is inherited to all processes, and Emacs
breaks.

The Emacs manual also says the following in (elisp) Security
Considerations, which is consistent with what you said above (and
unfortunate for users like me):

     Emacs has customization and other variables with similar
     considerations.  For example, if the variable ‘shell-file-name’
     specifies a shell with nonstandard behavior, an Emacs-based
     application may misbehave.

Too bad that there is not even a warning.

I’ll try to close this bug.





  reply	other threads:[~2023-10-05  7:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 10:09 bug#66338: 30.0.50; grep-commnd set and using an old fish results in empty Copyright files Alex Schroeder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-04 13:06 ` Dmitry Gutov
2023-10-04 16:52   ` Eli Zaretskii
2023-10-04 18:47     ` Alex Schroeder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-05  5:22       ` Eli Zaretskii
2023-10-05  7:13         ` Alex Schroeder via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-05 10:27           ` Michael Albinus
2023-10-05 10:43             ` Alex Schroeder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-05  7:18         ` Alex Schroeder via Bug reports for GNU Emacs, the Swiss army knife of text editors

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=877co1h784.fsf@alexschroeder.ch \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66338@debbugs.gnu.org \
    --cc=alex@alexschroeder.ch \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    /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://git.savannah.gnu.org/cgit/emacs.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).