GNU bug report logs -
#1206
double slash // in read-shell-command completion
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sun, 19 Oct 2008 15:30:03 UTC
Severity: minor
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> emacs -Q
> M-!
> ls d:/gnu/emacs/lisp
>
> Move point so that the cursor is on the slash between "emacs" and
> "lisp", and type TAB. At this point, the *Completions* buffer pops up
>
> Click <mouse-2> on a completion to select it.
> In this buffer, type RET to select the completion near point.
>
> Possible completions are:
> emacs-21.4/ emacs-22-branch/ emacs-22.x/
> emacs-23.pre-unicode/ emacs-bidi/ emacs-rtf/
> emacs/
>
> Clicking on "emacs-22-branch/" produces this in the minibuffer:
>
> emacs-22-branch//lisp
Could you test the following patch (admittedly a bit of a hack)?
*** trunk/lisp/simple.el.~1.1003.~ 2009-08-13 10:30:54.000000000 -0400
--- trunk/lisp/simple.el 2009-08-15 19:53:04.000000000 -0400
***************
*** 5843,5849 ****
--- 5843,5857 ----
(if base-size
(delete-region (+ base-size (field-beginning)) (point))
(choose-completion-delete-max-match choice))
+
+ ;; Insert the choice. When reading a file name and the choice
+ ;; is a directory, avoid having an extra "/" (Bug#1206).
(insert choice)
+ (and minibuffer-completing-file-name
+ (looking-at "/")
+ (= (aref choice (1- (length choice))) ?/)
+ (delete-char 1))
+
(remove-text-properties (- (point) (length choice)) (point)
'(mouse-face nil))
;; Update point in the window that BUFFER is showing in.
This bug report was last modified 150 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.