From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: shell-mode command completion with slashes Date: Thu, 30 Oct 2008 21:56:55 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1225420831 25869 80.91.229.12 (31 Oct 2008 02:40:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 02:40:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 31 03:41:34 2008 connect(): Connection refused 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 1Kvjx6-00054T-JE for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Oct 2008 03:41:32 +0100 Original-Received: from localhost ([127.0.0.1]:47683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvjvz-0003Kr-RQ for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Oct 2008 22:40:23 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news.eternal-september.org!news.motzarella.org!motzarella.org!registered.motzarella.org!barmar Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-X-Trace: registered.motzarella.org U2FsdGVkX18y69nwm4iLyiTm13/Cg2GRBr2Y5q3RexRdYqw2+/YAIsee/f3vymmPx01bzqhlH2cWRzSY6mZ6IhDYA+FjYe3JcS/xwpTYCmZ2SbVfNhPGg4FcU4NIikNpKY1a+Fhxigf1R7OoF657RQ== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Fri, 31 Oct 2008 01:56:57 +0000 (UTC) X-Auth-Sender: U2FsdGVkX197LrxlEBdJcFaXiov5QcGW7kFHu3t6nwE= Cancel-Lock: sha1:iJMm3ifMcshVW0bIZcHqEUPICss= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:163938 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:59280 Archived-At: In article , Stephen Berman wrote: > On Thu, 30 Oct 2008 12:57:22 -0400 Barry Margolin wrote: > > > I'm running Emacs 22.2.50 on OS X 10.5.5, and I use shell mode > > extensively. I don't have "." in my $PATH, so if I want to run a > > program in the current directory I need to type "./program-name". I'd > > like to be able to type "./prog" and have it complete it, but it > > doesn't. I looked at the source code of shell-dynamic-complete-command, > > and it explicitly checks for "~" or "/" in the word being completed, and > > gives up. And shell-dynamic-complete-filename gives up if it's being > > used for the first word of a command, it only works for arguments. > > > > This used to work, probably before I upgraded from 22.1 to 22.2. Anyone > > know how to get the old behavior back? Did it use > > comint-dynamic-complete-filename instead of > > shell-dynamic-complete-filename? The former doesn't check for the > > location in the command, but it also doesn't care whether the file it > > completes to is an executable. > > This was caused by this change: > > 2008-04-03 Chong Yidong > > * shell.el (shell-dynamic-complete-filename): New fun. > (shell-dynamic-complete-functions): Use it. > > This was after the release of 22.2 but backported. It was fixed by this > change: > > 2008-07-23 Chong Yidong > > * shell.el (shell-dynamic-complete-functions): > Use comint-dynamic-complete-filename as well (bug#361). > > and that is in 22.3. So it will include all files in the completion, not just executables. It also seems to make shell-dynamic-complete-filename redundant, since it's basically the same as comint-dynamic-complete-filename except that it will not expand the first word of a command. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***