unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Relation between the value of shell-file-name and explicit-shell-file-name
@ 2006-12-13 22:55 Lennart Borgman
  2006-12-14  1:33 ` Stuart D. Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2006-12-13 22:55 UTC (permalink / raw)


What is the relation between the values of these two variables? Could 
the doc strings please mention something about it? (Does 
explicit-shell-file-name override shell-file-name for explicitly 
requested shells? Are those the shells started with M-x shell? )

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Relation between the value of shell-file-name and  explicit-shell-file-name
  2006-12-13 22:55 Relation between the value of shell-file-name and explicit-shell-file-name Lennart Borgman
@ 2006-12-14  1:33 ` Stuart D. Herring
  2006-12-14  1:44   ` Lennart Borgman
  0 siblings, 1 reply; 6+ messages in thread
From: Stuart D. Herring @ 2006-12-14  1:33 UTC (permalink / raw)
  Cc: Emacs Devel

> What is the relation between the values of these two variables? Could
> the doc strings please mention something about it? (Does
> explicit-shell-file-name override shell-file-name for explicitly
> requested shells? Are those the shells started with M-x shell? )

`explicit-shell-file-name' is only ever used by M-x shell.  It does

(or explicit-shell-file-name
    (getenv "ESHELL") shell-file-name)

which obviously prefers $ESHELL to `shell-file-name' and
`explicit-shell-file-name' to $ESHELL.  Note that it was different in
Emacs 21:

(or explicit-shell-file-name
    (getenv "ESHELL")
    (getenv "SHELL")
    "/bin/sh")

Here `shell-file-name' is absent.  The idea is that e-s-f-n is the
"personal" shell and s-f-n is the "utility" shell used by such things as
M-! and (unless you customize `ediff-shell') M-x ediff.

What do you want added to e-s-f-n's doc string to clarify this?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Relation between the value of shell-file-name and explicit-shell-file-name
  2006-12-14  1:33 ` Stuart D. Herring
@ 2006-12-14  1:44   ` Lennart Borgman
  2006-12-14 17:47     ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2006-12-14  1:44 UTC (permalink / raw)
  Cc: Emacs Devel

Stuart D. Herring wrote:
>> What is the relation between the values of these two variables? Could
>> the doc strings please mention something about it? (Does
>> explicit-shell-file-name override shell-file-name for explicitly
>> requested shells? Are those the shells started with M-x shell? )
>>     
>
> `explicit-shell-file-name' is only ever used by M-x shell.  It does
>
> (or explicit-shell-file-name
>     (getenv "ESHELL") shell-file-name)
>
> which obviously prefers $ESHELL to `shell-file-name' and
> `explicit-shell-file-name' to $ESHELL.  Note that it was different in
> Emacs 21:
>
> (or explicit-shell-file-name
>     (getenv "ESHELL")
>     (getenv "SHELL")
>     "/bin/sh")
>
> Here `shell-file-name' is absent.  The idea is that e-s-f-n is the
> "personal" shell and s-f-n is the "utility" shell used by such things as
> M-! and (unless you customize `ediff-shell') M-x ediff.
>
> What do you want added to e-s-f-n's doc string to clarify this?
>   

Thanks Davis. I think the best would be to tell that it is only used by 
the function shell. And BTW the doc string for shell is incorrect 
regarding what shell file name to use.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Relation between the value of shell-file-name and explicit-shell-file-name
  2006-12-14  1:44   ` Lennart Borgman
@ 2006-12-14 17:47     ` Richard Stallman
  2006-12-14 18:01       ` Lennart Borgman
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2006-12-14 17:47 UTC (permalink / raw)
  Cc: emacs-devel

    Thanks Davis. I think the best would be to tell that it is only used by 
    the function shell. And BTW the doc string for shell is incorrect 
    regarding what shell file name to use.

Could you be more specific?  I do not see what is wrong there.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Relation between the value of shell-file-name and explicit-shell-file-name
  2006-12-14 17:47     ` Richard Stallman
@ 2006-12-14 18:01       ` Lennart Borgman
  2006-12-15 21:25         ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2006-12-14 18:01 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman wrote:
>     Thanks Davis. I think the best would be to tell that it is only used by 
>     the function shell. And BTW the doc string for shell is incorrect 
>     regarding what shell file name to use.
>
> Could you be more specific?  I do not see what is wrong there.
>   

In the code for shell this part chooses the program to use for the shell:

    (let* ((prog (or explicit-shell-file-name
             (getenv "ESHELL") shell-file-name))

This seems good, but the doc string does not mention shell-file-name. It 
instead mentions SHELL which is wrong (and a bad idea):

  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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Relation between the value of shell-file-name and explicit-shell-file-name
  2006-12-14 18:01       ` Lennart Borgman
@ 2006-12-15 21:25         ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2006-12-15 21:25 UTC (permalink / raw)
  Cc: emacs-devel

    This seems good, but the doc string does not mention shell-file-name. It 
    instead mentions SHELL which is wrong (and a bad idea):

I see now.  Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-15 21:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-13 22:55 Relation between the value of shell-file-name and explicit-shell-file-name Lennart Borgman
2006-12-14  1:33 ` Stuart D. Herring
2006-12-14  1:44   ` Lennart Borgman
2006-12-14 17:47     ` Richard Stallman
2006-12-14 18:01       ` Lennart Borgman
2006-12-15 21:25         ` Richard Stallman

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).