emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: eshell and external commands


From: Chong Yidong
Subject: Re: address@hidden: eshell and external commands
Date: Wed, 08 Aug 2007 18:55:08 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> Often when executing a external command, eshell gets a bit confused.
> For example, when doing `ls -B' (-B will cause eshell to call the
> external ls)
>
> But, when inovoking the external command directly, /bin/ls -B, it
> works as it should

The bug arises in the part of eshell-send-input that chooses whether
to use eshell-eval-command or eval to evaluate the command code.
Normally, it uses the more lightweight `eval' if the command is to be
invoked directly, but this loses if the "falling back on an external
program" behavior is activated.  When eshell-eval-command is used, it
seems to set things up so that the (deferred) command output goes in
the correct place.

The following patch fixes this.  However, maybe it is too drastic
because it imposes the use of eshell-eval-command on *every* build-in
command.

What do you think?


*** emacs/lisp/eshell/esh-mode.el.~1.28.2.1.~   2007-08-08 18:44:33.000000000 
-0400
--- emacs/lisp/eshell/esh-mode.el       2007-08-08 18:45:49.000000000 -0400
***************
*** 727,735 ****
                      (run-hooks 'eshell-input-filter-functions)
                      (and (catch 'eshell-terminal
                             (ignore
!                             (if (eshell-invoke-directly cmd input)
!                                 (eval cmd)
!                               (eshell-eval-command cmd input))))
                           (eshell-life-is-too-much)))))
              (quit
               (eshell-reset t)
--- 727,733 ----
                      (run-hooks 'eshell-input-filter-functions)
                      (and (catch 'eshell-terminal
                             (ignore
!                             (eshell-eval-command cmd input)))
                           (eshell-life-is-too-much)))))
              (quit
               (eshell-reset t)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]