[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
bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on MS-Windows
Fri, 04 May 2012 23:36:51 +0800
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
(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.