[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optimal emacs shell for coding
From: |
Rupert Swarbrick |
Subject: |
Re: Optimal emacs shell for coding |
Date: |
Tue, 12 Aug 2008 21:08:36 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) |
>>>
>>> >> ~/web/emacs $ which grep
...
>>> >> emacs_n_unicode.html xah_emacs_linkify.el~
>>> >> ~/web/emacs $
...
>>> >
>>> >
>>> > Why do you think predictable behaviour is nice? ;-)
>>> >
>>> > Ok, you discovered the bug so it is your turn to file a bug report again
>>> > ...
>>>
>>> don't think its a bug. This is eshell not handling redirection correclty
>>> and is something that cannot be easily fixed. Bottom line, don't use
>>> redirection in eshell.
>>
>> FWIW, I don't see anything wrong with the above: just unwrap the
>> obviously wrapped lines, and you will see that everything is
>> honky-dory.
>
> But it's different from how bash + ls behave in a "normal" terminal.
> When stdout for the `ls' command is not a tty it prints one file per
> line (IMHO the right way).
>
> David
Well, I just dug out coreutils' sources. In ls.c, line 1423 in the
function decode_switches, the magic reveals itself:
switch (ls_mode)
{
case LS_MULTI_COL:
/* This is for the `dir' program. */
format = many_per_line;
set_quoting_style (NULL, escape_quoting_style);
break;
case LS_LONG_FORMAT:
/* This is for the `vdir' program. */
format = long_format;
set_quoting_style (NULL, escape_quoting_style);
break;
case LS_LS:
/* This is for the `ls' program. */
if (isatty (STDOUT_FILENO))
{
format = many_per_line;
/* See description of qmark_funny_chars, above. */
qmark_funny_chars = true;
}
else
{
format = one_per_line;
qmark_funny_chars = false;
}
break;
default:
abort ();
}
(If my gnus-foo worked, otherwise I'll post the snippet in a sec)
Presumably, isatty(STDOUT_FILENO) is returning true for some reason when
called under eshell?
Rupert
pgpavVKewhXwL.pgp
Description: PGP signature
- Re: Optimal emacs shell for coding, (continued)
- Message not available
- Re: Optimal emacs shell for coding, Tim X, 2008/08/13
- Re: Optimal emacs shell for coding, Thierry Volpiatto, 2008/08/13
- eshell pipelines (Was: Re: Optimal emacs shell for coding), David Hansen, 2008/08/13
- Re: eshell pipelines, Thierry Volpiatto, 2008/08/13
- Re: Optimal emacs shell for coding, ken, 2008/08/13
- Re: Optimal emacs shell for coding, Lennart Borgman (gmail), 2008/08/12
- Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/12
- Re: Optimal emacs shell for coding, David Hansen, 2008/08/12
- Message not available
- Re: Optimal emacs shell for coding,
Rupert Swarbrick <=
Re: Optimal emacs shell for coding, Eli Zaretskii, 2008/08/11
Re: Optimal emacs shell for coding, Tim X, 2008/08/12
Re: Optimal emacs shell for coding, Mike Treseler, 2008/08/11