From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 11348@debbugs.gnu.org
Subject: bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on MS-Windows
Date: Fri, 04 May 2012 13:59:43 -0400 [thread overview]
Message-ID: <jwvr4uzdemc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83obqeiwb0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Apr 2012 14:09:39 +0300")
> M-! cd d:\gnu TAB
> (A directory 'd:/gnu' exists on my disk.)
> After pressing the TAB key, the minibuffer displays this:
> cd d:\/gnu/
Duh, I somehow assumed it was on the trunk (seeing how it was reported
soon after I modified code on the trunk in this area).
IIUC from the rest of the thread, the problem is in the pcomplete code
(it affects `cd' but not `toto'). That's bad because the pcomplete code
is even trickier than the rest.
This said, based on your description, the problem may simply come from
shell.el's setting of pcomplete-arg-quote-list which tells pcomplete
that \ is an escape char.
I.e. does the patch below fix the problem?
> This works better, it produces "cd d:\gnu/ ", which is ugly, but
> correct.
Which part is ugly? The \, the /, or the use of a mix of them?
> Perhaps Stefan could at some point add some documentation about the
> internals, that would allow mere mortals such as myself debug the
> completion code.
I'd love to, but I'm much too deeply in it to know what needs more
documentation, so fire away your questions and I'll reply with
comments&docstrings.
Stefan
=== modified file 'lisp/shell.el'
--- lisp/shell.el 2012-02-28 08:17:21 +0000
+++ lisp/shell.el 2012-05-04 17:57:59 +0000
@@ -429,7 +429,7 @@
(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))
+ shell-delimiter-argument-list)
(set (make-local-variable 'pcomplete-termination-string)
(cond ((not comint-completion-addsuffix) "")
((stringp comint-completion-addsuffix)
next prev parent reply other threads:[~2012-05-04 17:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 11:09 bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on MS-Windows Eli Zaretskii
2012-05-04 7:10 ` Eli Zaretskii
2012-05-04 14:29 ` Chong Yidong
2012-05-04 14:54 ` Eli Zaretskii
2012-05-04 15:07 ` Drew Adams
2012-05-04 15:36 ` Chong Yidong
2012-05-04 15:02 ` Eli Zaretskii
2012-05-04 15:46 ` Chong Yidong
2012-05-04 17:01 ` Eli Zaretskii
2012-05-04 17:59 ` Stefan Monnier [this message]
2012-05-04 18:15 ` Eli Zaretskii
2012-05-04 23:32 ` Stefan Monnier
2012-05-05 0:22 ` Drew Adams
2012-05-05 12:47 ` Eli Zaretskii
2012-05-05 4:20 ` Stefan Monnier
2012-05-05 6:33 ` Eli Zaretskii
2012-05-07 8:01 ` Chong Yidong
2012-05-07 17:40 ` Eli Zaretskii
2012-05-07 15:27 ` Stefan Monnier
2012-05-07 15:44 ` Drew Adams
2012-05-07 16:11 ` Chong Yidong
2012-05-08 0:27 ` Stefan Monnier
2012-05-08 18:56 ` Eli Zaretskii
2012-05-09 17:22 ` Stefan Monnier
2012-05-09 18:07 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvr4uzdemc.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=11348@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.