From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: amd@gnu.org: eshell and external commands Date: Tue, 16 Oct 2007 21:09:39 -0400 Message-ID: References: <87zm11iqlv.fsf@stupidchicken.com> <873aysr987.fsf@stupidchicken.com> <87fy2sedjd.fsf@stupidchicken.com> <871wbvm5mw.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192583423 22450 80.91.229.12 (17 Oct 2007 01:10:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Oct 2007 01:10:23 +0000 (UTC) Cc: "Alfred M. Szmidt" , rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 17 03:10:21 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IhxQS-0005Vy-QF for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2007 03:10:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhxQL-0000jM-FL for ged-emacs-devel@m.gmane.org; Tue, 16 Oct 2007 21:10:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IhxQH-0000j5-Dd for emacs-devel@gnu.org; Tue, 16 Oct 2007 21:10:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IhxQE-0000ii-VO for emacs-devel@gnu.org; Tue, 16 Oct 2007 21:10:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhxQE-0000ie-P5 for emacs-devel@gnu.org; Tue, 16 Oct 2007 21:10:06 -0400 Original-Received: from johnwiegley.com ([208.70.150.153] helo=mail.johnwiegley.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IhxQ6-0005CI-Pb; Tue, 16 Oct 2007 21:09:58 -0400 Original-Received: from Hermes.local (unknown [72.51.84.79]) by mail.johnwiegley.com (Postfix) with ESMTP id 9C7F14224DC; Tue, 16 Oct 2007 20:09:57 -0500 (CDT) Original-Received: by Hermes.local (Postfix, from userid 501) id B0B184E77A9; Tue, 16 Oct 2007 21:09:39 -0400 (AST) In-Reply-To: <871wbvm5mw.fsf@stupidchicken.com> (Chong Yidong's message of "Tue\, 16 Oct 2007 11\:38\:31 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81034 Archived-At: Chong Yidong writes: > John Wiegley writes: > >> Ok, I have to give this some serious thought, which I cannot do just now >> because I'm about to move to Grenada. After a week or so has gone by and I've >> settled in, then I can focus enough to find the right answer. > > Hi John, > > Any further thoughts on this problem? Yes, after looking into it, I've discovered that there is a facility for countering this very behavior. For commands -- like ls -- which need special care, the command must be added to `eshell-complex-commands'. I have seen this behavior only from ls so far, so I think it should be added directly to that variable's default value in esh-cmd.el. (defcustom eshell-complex-commands '("ls") "*A list of commands names or functions, that determine complexity. That is, if a command is defined by a function named eshell/NAME, and NAME is part of this list, it is invoked as a complex command. Complex commands are always correct, but run much slower. If a command works fine without being part of this list, then it doesn't need to be. If an entry is a function, it will be called with the name, and should return non-nil if the command is complex." :type '(repeat :tag "Commands" (choice (string :tag "Name") (function :tag "Predicate"))) :group 'eshell-cmd) John