emacs-devel
[Top][All Lists]
Advanced

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

Re: Eshell visual commands with redirection bug


From: Aidan Gauland
Subject: Re: Eshell visual commands with redirection bug
Date: Mon, 10 Jun 2013 20:20:52 +1200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Tassilo Horn <address@hidden> writes:

> I think the problem is that git uses isatty(3) to detect if its output
> is piped or redirected.  If so, then it's just dumped, else it's
> paginated.  So probably redirections in eshell can't be detected with
> isatty, right?

Ah, yes, that makes sense.  I also figured out why I couldn't reproduce
the bug: I wasn't using less, because I have $PAGER set to "cat". >_<
Shoulda tried it with emacs -Q before shooting my mouth off.

The behaviour you described where
  $ git log > glog.txt
hangs is present in Eshell from Emacs 24.3.1, so this bug existed before
our subcommand changes.

I think the function at fault is `eshell-gather-process-output'; this
seems to be where Eshell invokes external commands.
`eshell-interactive-output-p' should tell us whether output redirection
is being done, but Emacs does not seem to provide mechanisms for
operations as low level as mucking with the stdout file descriptor.  If
this is the case, I think your "**" prefix idea is a good workaround.
(I checked that the single star "*" prefix does, in fact, means "don't
use internal command", and does not disable special treatment of
visual-commands.)

--Aidan



reply via email to

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