GNU bug report logs - #20873
24.5; shell command completion faulty

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Mon, 22 Jun 2015 13:26:02 UTC

Severity: normal

Found in version 24.5

Fixed in version 25.1

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Liu <sdl.web <at> gmail.com>
Subject: bug#20873: closed (Re: bug#20873: 24.5; shell command completion
 faulty)
Date: Tue, 23 Jun 2015 01:27:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#20873: 24.5; shell command completion faulty

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 20873 <at> debbugs.gnu.org.

-- 
20873: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20873
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 20873-done <at> debbugs.gnu.org
Subject: Re: bug#20873: 24.5; shell command completion faulty
Date: Tue, 23 Jun 2015 09:26:35 +0800
version: 25.1

On 2015-06-23 06:13 +0800, Stefan Monnier wrote:
> Could be.  I don't have time to dig into it right now, but another
> option might be to change shell-backward-command instead.

OK. I put in a fix there. Thanks.

Leo

[Message part 3 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; shell command completion faulty
Date: Mon, 22 Jun 2015 21:24:50 +0800
1. M-x shell
2. Put a few spaces before entering `c' followed by TAB

No completion.

I wonder if the following is the right fix?

diff --git a/lisp/shell.el b/lisp/shell.el
index 6d69ca63..788b8169 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1134,7 +1134,9 @@ (defun shell-command-completion ()
     (if (and filename
 	     (save-match-data (not (string-match "[~/]" filename)))
 	     (eq (match-beginning 0)
-		 (save-excursion (shell-backward-command 1) (point))))
+		 (save-excursion (shell-backward-command 1)
+				 (skip-syntax-forward " ")
+				 (point))))
 	(shell--command-completion-data))))
 
 (defun shell--command-completion-data ()



This bug report was last modified 9 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.