From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rupert Swarbrick Newsgroups: gmane.emacs.help Subject: Re: Optimal emacs shell for coding Date: Tue, 12 Aug 2008 21:08:36 +0100 Organization: albasani.net Message-ID: References: <577bf477-6877-4cab-b4c3-fb72b995a095@i20g2000prf.googlegroups.com> <66bf7b7c-8e2b-4266-812a-6531c93f9399@v1g2000pra.googlegroups.com> <87skta4py4.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1218573662 2143 80.91.229.12 (12 Aug 2008 20:41:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2008 20:41:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 22:41:53 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KT0gc-000357-BN for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Aug 2008 22:41:47 +0200 Original-Received: from localhost ([127.0.0.1]:38310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KT0ff-0000ww-1I for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Aug 2008 16:40:47 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 100 Original-X-Trace: news.albasani.net 5sYxLTX5IWeqEv6ceZd1GNzOY0iK+EK2e7TlRx1y/7Pnl7geUD57pGeofSjwPjuN7F3Kt8MvsvMYR23Ru11K4JcXhpO5aihsBLfTSvp+OQcCJJi5rEcv2917DTD280s6 Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Tue, 12 Aug 2008 20:08:40 +0000 (UTC) X-User-ID: 0d9zdwoiyq7ZavQrihMvE5YVNv3zygDYyfZMRySqmGc= Cancel-Lock: sha1:4OJMeLqZUVSc0AgKYh9ns+lhNpY= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) X-NNTP-Posting-Host: h7gML1fnkLg/L00dGbqoMeFYA4bfWi18Wh9bIKQ85Qo= Original-Xref: news.stanford.edu gnu.emacs.help:161185 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56530 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Transfer-Encoding: quoted-printable >>>=20 >>> >> ~/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 ag= ain ... >>>=20 >>> 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: --=-=-= Content-Type: text/x-c++src Content-Disposition: inline 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 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iJwEAQECAAYFAkih7cUACgkQRtd/pJbYVoapeQQAg0FKC0pEDBPOt8W7Bf2P8+3D 9nZzRv8z57JXL2psE7QlzpEw0rX+vTcdkS7tUbXq14eiXVvi1lQWpFYlsXGj/kUk 96flqUki4jPAu0yHIXadRLlQr6A7npn7bgHXA8zMluyPd92hGYBeCfnjQGdKjtT5 igcQwHuFWE0+52RYKGA= =UhxW -----END PGP SIGNATURE----- --==-=-=--