GNU bug report logs - #7215
24.0.50; Minibuffer path completion mispositions point

Previous Next

Package: emacs;

Reported by: Tim Van Holder <tim.vanholder <at> gmail.com>

Date: Thu, 14 Oct 2010 13:20:03 UTC

Severity: normal

Found in version 24.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tim Van Holder <tim.vanholder <at> gmail.com>
Cc: 7215 <at> debbugs.gnu.org
Subject: bug#7215: 24.0.50; Minibuffer path completion mispositions point
Date: Sun, 17 Oct 2010 13:31:34 -0400
> Now delete most of "directory", leaving the minibuffer as:

>   Find file: .../dir*/subdir/

> Now press [tab]. This correctly completes "dir" back to "directory", but
> also moves point backwards, resulting in:

>   Find file: .../di*rectory/subdir/

I've installed the patch below into the emacs-23 branch.  This should
fix the problem.  Please confirm,


        Stefan
        
        
=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el	2010-10-03 19:50:14 +0000
+++ lisp/minibuffer.el	2010-10-17 17:26:12 +0000
@@ -498,10 +498,11 @@
       (setq suffix-len (1+ suffix-len)))
     (unless (zerop suffix-len)
       (setq end (- end suffix-len))
-      (setq newtext (substring newtext 0 (- suffix-len)))))
+      (setq newtext (substring newtext 0 (- suffix-len))))
   (goto-char beg)
   (insert newtext)
-  (delete-region (point) (+ (point) (- end beg))))
+    (delete-region (point) (+ (point) (- end beg)))
+    (forward-char suffix-len)))
 
 (defun completion--do-completion (&optional try-completion-function)
   "Do the completion and return a summary of what happened.





This bug report was last modified 14 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.