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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20873 in the body.
You can then email your comments to 20873 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20873; Package emacs. (Mon, 22 Jun 2015 13:26:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 22 Jun 2015 13:26:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 ()




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20873; Package emacs. (Mon, 22 Jun 2015 22:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 20873 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 20873 <at> debbugs.gnu.org
Subject: Re: bug#20873: 24.5; shell command completion faulty
Date: Mon, 22 Jun 2015 18:13:10 -0400
> I wonder if the following is the right fix?
[...]
> -		 (save-excursion (shell-backward-command 1) (point))))
> +		 (save-excursion (shell-backward-command 1)
> +				 (skip-syntax-forward " ")
> +				 (point))))

Could be.  I don't have time to dig into it right now, but another
option might be to change shell-backward-command instead.


        Stefan




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Tue, 23 Jun 2015 01:27:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Liu <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Tue, 23 Jun 2015 01:27:02 GMT) Full text and rfc822 format available.

Message #13 received at 20873-done <at> debbugs.gnu.org (full text, mbox):

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 21 Jul 2015 11:24:04 GMT) Full text and rfc822 format available.

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.