From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Trey Jackson Newsgroups: gmane.emacs.bugs Subject: shell-replace-by-expanded-directory bug when expanding =1/ Date: Thu, 2 May 2002 16:36:25 -0700 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <200205022336.QAA24731@dttlx120.pdx.intel.com> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1020382752 14494 127.0.0.1 (2 May 2002 23:39:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 2 May 2002 23:39:12 +0000 (UTC) Cc: tjackson@ichips.intel.com Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 173QAK-0003le-00 for ; Fri, 03 May 2002 01:39:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 173QAH-0005E4-00; Thu, 02 May 2002 19:39:09 -0400 Original-Received: from jffdns01.or.intel.com ([134.134.248.3] helo=ganymede.or.intel.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 173Q7k-0004yW-00 for ; Thu, 02 May 2002 19:36:32 -0400 Original-Received: from ichips-ra.pdx.intel.com (ichips-ra.pdx.intel.com [10.7.8.35]) by ganymede.or.intel.com (8.11.6/8.11.6/d: solo.mc,v 1.36 2002/05/02 20:19:58 root Exp $) with ESMTP id g42NaVO05734 for ; Thu, 2 May 2002 23:36:31 GMT Original-Received: from dttlx120.pdx.intel.com (dttlx120.pdx.intel.com [10.7.46.212]) by ichips-ra.pdx.intel.com (8.9.1a/8.9.1/d: internal.m4,v 1.2 1998/11/09 19:18:37 iwep Exp iwep $) with ESMTP id QAA19992; Thu, 2 May 2002 16:36:27 -0700 (PDT) Original-Received: (from tjackson@localhost) by dttlx120.pdx.intel.com (8.9.1a/8.9.1/d: client-ra.m4,v 1.1 1998/12/24 19:00:55 jamesw Exp jamesw $) id QAA24731; Thu, 2 May 2002 16:36:25 -0700 X-Authentication-Warning: dttlx120.pdx.intel.com: tjackson set sender to tjackson@dttlx120.pdx.intel.com using -f Original-To: bug-gnu-emacs@gnu.org Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:1116 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:1116 This bug report will be sent to the Free Software Foundation, not to your local site managers!! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. In GNU Emacs 20.7.1 (i686-pc-linux-gnu, X toolkit) of Mon Oct 30 2000 on filc0021 configured using `configure --prefix=/usr/intel/pkgs/emacs/20.7' Please describe exactly what actions triggered the bug and the precise symptoms of the bug: In shell mode, when you have a directory stack, the dirstack completion introduces an extra slash. e.g. '=1/jou' expands to '/tmp/inv4_opt//jou' when it should expand to '/tmp/inv4_opt/jou' - at least if it's supposed to act all like tcsh. Here's actual footage: ,---------------- | [dttlx120] inv4_opt 6> pushd | ~ /tmp/inv4_opt | [dttlx120] ~ 7> ls /tmp/inv4_opt//jour `---------------- A patch (two characters added) can be found at the end of this file. Note: I patched the 21.1 version - because the bug is in that version as well. I just happen to run 20.7 on a regular basis. The fix works in both versions. Thanks. TJ Recent input: h d l tab backspace tab backspace tab backspace C-a C-k l s return c d SPC i n v 4 _ o p t return l s return p u s h d return l s SPC = 1 / j o u r tab tab M-b C-a C-e C-a C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-e M-x e m a c SPC r e SPC p o backspace backspace backspace backspace backspace backspace backspace backspace backspace backspace backspace r e p o tab r t tab return Recent messages: Completing file name... Loading ange-ftp... Loading ange-ftp...done No completions of /jour Beginning of buffer Making completion list... Loading view... Loading view...done Loading emacsbug... Loading emacsbug...done ------------------------------------------------------------------- *** /usr/intel/pkgs/emacs/21.1/share/emacs/21.1/lisp/shell.el Sat Jul 14 04:21:08 2001 --- shell.patched.el Thu May 2 16:31:49 2002 *************** *** 996,1002 **** (let ((stack (cons default-directory shell-dirstack)) (index (cond ((looking-at "=-/?") (length shell-dirstack)) ! ((looking-at "=\\([0-9]+\\)") (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))))) --- 996,1002 ---- (let ((stack (cons default-directory shell-dirstack)) (index (cond ((looking-at "=-/?") (length shell-dirstack)) ! ((looking-at "=\\([0-9]+\\)/?") (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))))))