From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Subject: Some bugs in inferior shell doc and handling
Date: Thu, 14 Dec 2006 17:17:16 +0100 [thread overview]
Message-ID: <4581790C.3000104@student.lu.se> (raw)
Shell argument quoting on w32 is difficult! I looked at this again and
think I found a couple of more bugs.
******* defun shell:
doc string says
Program used comes from variable `explicit-shell-file-name',
or (if that is nil) from the ESHELL environment variable,
or else from SHELL if there is no ESHELL.
The last line should probably be
or else from shell-file-name if there is no ESHELL.
Info has the same doc bug.
**** environ var ESHELL doc:
(info "(emacs) General Variables") says
`ESHELL'
Used for shell-mode to override the `SHELL' environment variable.
I think ESHELL is rather used for starting the inferior process for
`shell' and `term'.
**** defun term:
Is this supposed to work on w32? It currently does not which is a bug.
Either the doc string should say it does not work on w32 or it should
work I think.
**** defcustom explicit-shell-file-name
Doc string is unclear to me. Does "explicitly requested inferior shells"
simply mean "interactive shells started by `shell'?
**** defun w32-shell-name
This is the worst bug. The intention of this function is unclear. The
doc string does not tell its intended use however and that is to me a
bug. w32-shell-dos-semantics uses w32-shell-name but should probably
just use shell-file-name instead since that is what is used when
starting non-interactive inferior shells AFAICS. This is currently a bug
in w32-shell-dos-semantics.
w32-shell-name is however also used in bat-generic-mode-compile and
bat-generic-mode-run-as-comint which seems to assume that it points to
cmd.exe or command.com. This is another bug (or two). Maybe
w32-shell-name should be for that instead? Perhaps there are people out
there using w32-shell-name so I instead suggest a new function like this
for use in those bat-* functions
(defun w32-default-console-name()
"Return "cmd.exe" on NT and "command.com" on DOS."
...)
Or perhaps just fix the bat-* functions?
**** defun text-start-shell
This supposes a unix style shell. However it does not check that it
actually is a unix style shell. This is a bug. Could it use w32 style
shells too if text-start-shell was changed to allow this?
The way it chooses shells suggests to me that it also should check
explicit-shell-file-name (before ESHELL) to be consistent with the use
of these variables. But I am not sure about the intention here. Maybe
the ESHELL test should be removed instead?
**** The use of SHELL and ESHELL
This is an important matter I believe. I wonder about the use of SHELL
and ESHELL. SHELL is used to initialize shell-file-name. Why should it
be used more in the code? What about starting inferior shells? If you
change shell-file-name do you have to change SHELL to?
Could not ESHELL be used in the same way to initialize
explicit-shell-file-name?
reply other threads:[~2006-12-14 16:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4581790C.3000104@student.lu.se \
--to=lennart.borgman.073@student.lu.se \
/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).