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

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

bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on


From: Chong Yidong
Subject: bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on MS-Windows
Date: Fri, 04 May 2012 23:36:51 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> The black magic occurs in `comint--complete-file-name-data' in
>> comint.el.  You could first try to evaluate
>> 
>>   (completion-file-name-table "d:\gnu" nil t)
>> 
>> and see if that does something funny.
>
> Thanks, I will take a look.

FWIW, here is my impression.  Emacs 23.4 has the following code in
`comint-dynamic-complete-as-filename':

   (let ((file (concat (file-name-as-directory directory) completion)))
     ;; Insert completion.  Note that the completion string
     ;; may have a different case than what's in the prompt,
     ;; if read-file-name-completion-ignore-case is non-nil,
     (delete-region filename-beg filename-end)
     (if filedir (insert (comint-quote-filename filedir)))

If I'm not mistaken, this is the part that turns d:\gnu into d:/gnu.

Emacs 24 uses the completion-at-point mechanism.  The equivalent code
responsible for replacing the quoted prefix is (IIUC) the `prefixes'
stuff in comint--complete-file-name-data, around comint.el:3178.
That's probably where the bug lies.





reply via email to

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