emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#9161: closed (24.0.50; incorrect completion-at-poi


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9161: closed (24.0.50; incorrect completion-at-point in *shell* buffer)
Date: Tue, 23 Aug 2011 05:29:02 +0000

Your message dated Tue, 23 Aug 2011 01:25:35 -0400
with message-id <address@hidden>
and subject line Re: bug#9161: 24.0.50; incorrect completion-at-point in 
*shell* buffer
has caused the GNU bug report #9161,
regarding 24.0.50; incorrect completion-at-point in *shell* buffer
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9161: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9161
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; incorrect completion-at-point in *shell* buffer Date: Sun, 24 Jul 2011 21:32:49 +0900
With the latest trunk Emacs, the command completion-at-point
(TAB) in *shell* buffer yields wrong completion.

Provided that you have a single directory '0 a'.
% ls 0<TAB>
is completed to
% ls 0\ a

But,
% cd 0<TAB>
is completed to
% cd 0 a

Note that the space between '0' and 'a' is not escaped by '\'.

---
Kenichi Handa
address@hidden



--- End Message ---
--- Begin Message --- Subject: Re: bug#9161: 24.0.50; incorrect completion-at-point in *shell* buffer Date: Tue, 23 Aug 2011 01:25:35 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
> But,
> % cd 0<TAB>
> is completed to
> % cd 0 a

Thanks.  I think the patch below fixes this problem.


        Stefan


=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog      2011-08-23 05:21:09 +0000
+++ lisp/ChangeLog      2011-08-23 05:23:21 +0000
@@ -1,5 +1,8 @@
 2011-08-23  Stefan Monnier  <address@hidden>
 
+       * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list.
+       * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161).
+
        * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop.
        Mark obsolete.
        * shell.el (shell-parse-pcomplete-arguments): New function.

=== modified file 'lisp/pcomplete.el'
--- lisp/pcomplete.el   2011-08-23 05:21:09 +0000
+++ lisp/pcomplete.el   2011-08-23 05:21:58 +0000
@@ -883,7 +883,7 @@
                        (or (run-hook-with-args-until-success
                             'pcomplete-quote-arg-hook filename index)
                            (when (memq c pcomplete-arg-quote-list)
-                             (string "\\" c))
+                             (string ?\\ c))
                            (char-to-string c))
                      (setq index (1+ index))))
                  filename

=== modified file 'lisp/shell.el'
--- lisp/shell.el       2011-08-23 05:21:09 +0000
+++ lisp/shell.el       2011-08-23 05:21:45 +0000
@@ -412,6 +412,8 @@
        shell-dynamic-complete-functions)
   (set (make-local-variable 'pcomplete-parse-arguments-function)
        #'shell-parse-pcomplete-arguments)
+  (set (make-local-variable 'pcomplete-arg-quote-list)
+       (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil))
   (set (make-local-variable 'pcomplete-termination-string)
        (cond ((not comint-completion-addsuffix) "")
              ((stringp comint-completion-addsuffix)



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]