From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: shell-mode command completion with slashes Date: Thu, 30 Oct 2008 20:48:42 +0100 Message-ID: <87hc6tn9t1.fsf@escher.local.home> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1225396181 17733 80.91.229.12 (30 Oct 2008 19:49:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2008 19:49:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 30 20:50:42 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 1KvdXM-00009P-Sj for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Oct 2008 20:50:33 +0100 Original-Received: from localhost ([127.0.0.1]:59017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvdWG-0000Ki-JN for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Oct 2008 15:49:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvdVy-0000KC-3M for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 15:49:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvdVw-0000JQ-Fw for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 15:49:05 -0400 Original-Received: from [199.232.76.173] (port=35594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvdVw-0000JK-Bb for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 15:49:04 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:59785 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KvdVw-0005iq-49 for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 15:49:04 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KvdVg-0003rc-Mh for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 19:48:48 +0000 Original-Received: from i5387eff7.versanet.de ([83.135.239.247]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Oct 2008 19:48:48 +0000 Original-Received: from stephen.berman by i5387eff7.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Oct 2008 19:48:48 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: i5387eff7.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:59266 Archived-At: 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. Steve Berman