all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host
       [not found] ` <20170802075500.60BEA20E71@vcs0.savannah.gnu.org>
@ 2017-08-02 13:29   ` Stefan Monnier
  2017-08-02 13:46     ` Tino Calancha
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2017-08-02 13:29 UTC (permalink / raw)
  To: emacs-devel; +Cc: Tino Calancha

>     Don't assume /bin/sh as the 'sh' location in the local host
[...]
> +                            (and (bound-and-true-p explicit-shell-file-name)
> +                                 (executable-find explicit-shell-file-name))

Hmm... why did you choose explicit-shell-file-name over shell-file-name?


        Stefan



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

* Re: [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host
  2017-08-02 13:29   ` [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host Stefan Monnier
@ 2017-08-02 13:46     ` Tino Calancha
  2017-08-02 15:54       ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Tino Calancha @ 2017-08-02 13:46 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Tino Calancha, Michael Albinus, Emacs developers



On Wed, 2 Aug 2017, Stefan Monnier wrote:

>>     Don't assume /bin/sh as the 'sh' location in the local host
> [...]
>> +                            (and (bound-and-true-p explicit-shell-file-name)
>> +                                 (executable-find explicit-shell-file-name))
>
> Hmm... why did you choose explicit-shell-file-name over shell-file-name?
It was mentioned by Michael as a possibility.  I chose it because is a
defcustom: it might reflect an user preference compared with 
shell-file-name which is given.

For example, my shell-file-name is bash.  I might customize
explicit-shell-file-name to '/bin/zsh', then i can
use '**/' zsh syntaxis in the wildcard expansion:
(let ((buf
        (dired-noselect (expand-file-name "**/*.el" source-directory))))
   (with-current-buffer buf
     (dired-toggle-marks)
     (length (dired-get-marked-files))))
=> 1731
;; => 277 ; If i would use shell-file-name

We might changed it if you don't like it.




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

* Re: [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host
  2017-08-02 13:46     ` Tino Calancha
@ 2017-08-02 15:54       ` Stefan Monnier
  2017-08-02 16:04         ` Tino Calancha
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2017-08-02 15:54 UTC (permalink / raw)
  To: Tino Calancha; +Cc: Michael Albinus, Emacs developers

> It was mentioned by Michael as a possibility.  I chose it because is a
> defcustom: it might reflect an user preference compared with shell-file-name
> which is given.

explicit-shell-file-name is normally used when the user asks for a shell
(e.g. M-x shell), whereas shell-file-name is used whenever we want to
run a shell command (e.g. `shell-command`).

The docstring of `shell` says:

    Program used comes from variable `explicit-shell-file-name',
     or (if that is nil) from the ESHELL environment variable,
     or (if that is nil) from `shell-file-name'.

> For example, my shell-file-name is bash.  I might customize
> explicit-shell-file-name to '/bin/zsh', then i can
> use '**/' zsh syntaxis in the wildcard expansion:
> (let ((buf
>        (dired-noselect (expand-file-name "**/*.el" source-directory))))
>   (with-current-buffer buf
>     (dired-toggle-marks)
>     (length (dired-get-marked-files))))
> => 1731
> ;; => 277 ; If i would use shell-file-name

But setting explicit-shell-file-name to `/bin/zsh` doesn't let you use
`**/` in M-! whereas if you had set shell-file-name to `/bin/zsh` you'd
get that extra functionality everywhere.


        Stefan



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

* Re: [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host
  2017-08-02 15:54       ` Stefan Monnier
@ 2017-08-02 16:04         ` Tino Calancha
  0 siblings, 0 replies; 4+ messages in thread
From: Tino Calancha @ 2017-08-02 16:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers, Michael Albinus, Tino Calancha



On Wed, 2 Aug 2017, Stefan Monnier wrote:

>> For example, my shell-file-name is bash.  I might customize
>> explicit-shell-file-name to '/bin/zsh', then i can
>> use '**/' zsh syntaxis in the wildcard expansion:
>> (let ((buf
>>        (dired-noselect (expand-file-name "**/*.el" source-directory))))
>>   (with-current-buffer buf
>>     (dired-toggle-marks)
>>     (length (dired-get-marked-files))))
>> => 1731
>> ;; => 277 ; If i would use shell-file-name
>
> But setting explicit-shell-file-name to `/bin/zsh` doesn't let you use
> `**/` in M-! whereas if you had set shell-file-name to `/bin/zsh` you'd
> get that extra functionality everywhere.
I'd also lost the extra bash functionality everywhere :-)



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

end of thread, other threads:[~2017-08-02 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170802075459.16207.16636@vcs0.savannah.gnu.org>
     [not found] ` <20170802075500.60BEA20E71@vcs0.savannah.gnu.org>
2017-08-02 13:29   ` [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host Stefan Monnier
2017-08-02 13:46     ` Tino Calancha
2017-08-02 15:54       ` Stefan Monnier
2017-08-02 16:04         ` Tino Calancha

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.