all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: John Wiegley <johnw@gnu.org>
Cc: "Alfred M. Szmidt" <ams@gnu.org>, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: amd@gnu.org: eshell and external commands
Date: Wed, 08 Aug 2007 18:55:08 -0400	[thread overview]
Message-ID: <87zm11iqlv.fsf@stupidchicken.com> (raw)
In-Reply-To: <E1IHWRI-0004VP-Qi@fencepost.gnu.org> (Richard Stallman's message of "Sat\, 04 Aug 2007 23\:05\:56 -0400")

> 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	other threads:[~2007-08-08 22:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-05  3:05 amd@gnu.org: eshell and external commands Richard Stallman
2007-08-08 22:55 ` Chong Yidong [this message]
2007-08-09  6:23   ` John Wiegley
2007-08-09 15:58     ` Chong Yidong
2007-08-09 18:44       ` John Wiegley
2007-08-09 19:03         ` Chong Yidong
2007-08-09 19:18           ` John Wiegley
2007-10-16 15:38             ` Chong Yidong
2007-10-17  1:09               ` John Wiegley
2007-10-17  2:08                 ` Chong Yidong

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

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

  git send-email \
    --in-reply-to=87zm11iqlv.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=johnw@gnu.org \
    --cc=rms@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 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.