From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#7215: 24.0.50; Minibuffer path completion mispositions point Date: Sun, 17 Oct 2010 13:31:34 -0400 Message-ID: References: <87aamgc3jr.fsf@leeloo.anubex.internal> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287337361 11442 80.91.229.12 (17 Oct 2010 17:42:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2010 17:42:41 +0000 (UTC) Cc: 7215@debbugs.gnu.org To: Tim Van Holder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 17 19:42:39 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P7XFm-0005t1-Fm for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Oct 2010 19:42:38 +0200 Original-Received: from localhost ([127.0.0.1]:45190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7XFl-0001rR-Pl for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Oct 2010 13:42:37 -0400 Original-Received: from [140.186.70.92] (port=57015 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7XFf-0001qg-8I for bug-gnu-emacs@gnu.org; Sun, 17 Oct 2010 13:42:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7XFd-0005pJ-Bu for bug-gnu-emacs@gnu.org; Sun, 17 Oct 2010 13:42:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7XFd-0005pF-9q for bug-gnu-emacs@gnu.org; Sun, 17 Oct 2010 13:42:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P7X1e-00061j-90; Sun, 17 Oct 2010 13:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Oct 2010 17:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7215 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7215-submit@debbugs.gnu.org id=B7215.128733647923161 (code B ref 7215); Sun, 17 Oct 2010 17:28:02 +0000 Original-Received: (at 7215) by debbugs.gnu.org; 17 Oct 2010 17:27:59 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7X1a-00061W-FC for submit@debbugs.gnu.org; Sun, 17 Oct 2010 13:27:58 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7X1X-00061Q-80 for 7215@debbugs.gnu.org; Sun, 17 Oct 2010 13:27:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AusJAO/PukxMCpO7/2dsb2JhbACgM3dywxeFSQSSGQ X-IronPort-AV: E=Sophos;i="4.57,342,1283745600"; d="scan'208";a="79871988" Original-Received: from 76-10-147-187.dsl.teksavvy.com (HELO pastel.home) ([76.10.147.187]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 17 Oct 2010 13:31:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8DC1BA8112; Sun, 17 Oct 2010 13:31:34 -0400 (EDT) In-Reply-To: <87aamgc3jr.fsf@leeloo.anubex.internal> (Tim Van Holder's message of "Thu, 14 Oct 2010 15:22:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 17 Oct 2010 13:28:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40930 Archived-At: > 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.