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#12619: completion-at-point and changing buffer Date: Wed, 24 Oct 2012 13:48:33 -0400 Message-ID: References: <20121010213913.46dc940b@forcix.kollektiv-hamburg.de> <20121011201925.76b56a54@forcix.kollektiv-hamburg.de> <20121024183546.77834f77@forcix.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1351103342 7845 80.91.229.3 (24 Oct 2012 18:29:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2012 18:29:02 +0000 (UTC) Cc: 12619@debbugs.gnu.org To: Jorgen Schaefer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 24 20:29:10 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TR5hV-0007fd-3X for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2012 20:29:09 +0200 Original-Received: from localhost ([::1]:34381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR565-0003Iq-L8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2012 13:50:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR54j-0000nd-BW for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR54h-0003IE-Qd for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:49:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR54h-0003IA-Ms for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TR56c-0006F6-5m for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2012 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12619-submit@debbugs.gnu.org id=B12619.135110104623977 (code B ref 12619); Wed, 24 Oct 2012 17:51:02 +0000 Original-Received: (at 12619) by debbugs.gnu.org; 24 Oct 2012 17:50:46 +0000 Original-Received: from localhost ([127.0.0.1]:59926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TR56M-0006Eg-Cc for submit@debbugs.gnu.org; Wed, 24 Oct 2012 13:50:46 -0400 Original-Received: from relais.videotron.ca ([24.201.245.36]:20176) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TR56J-0006EX-6D for 12619@debbugs.gnu.org; Wed, 24 Oct 2012 13:50:45 -0400 Original-Received: from ceviche.home ([96.21.127.30]) by VL-VM-MR002.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MCE00A45S4XE160@VL-VM-MR002.ip.videotron.ca> for 12619@debbugs.gnu.org; Wed, 24 Oct 2012 13:48:34 -0400 (EDT) Original-Received: by ceviche.home (Postfix, from userid 20848) id B6572661F0; Wed, 24 Oct 2012 13:48:33 -0400 (EDT) In-reply-to: <20121024183546.77834f77@forcix.kollektiv-hamburg.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65994 Archived-At: >> I've just installed a patch which should solve those problems. >> Can you confirm it fixes your case? > I'm afraid it doesn't (tested with trunk/110646). The problem is that > `minibuffer-force-complete' uses `field-beginning' and `field-end', > neither of which returns a marker. So even if the original function > uses markers, at this point they are turned into absolute buffer > positions. > Wrapping both calls in `copy-marker' fixes the problem for me. You mean the patch below? I guess you're right, it's still needed for the use of `start' in: (lambda () "Cycle through the possible completions." (interactive) (let ((completion-extra-properties extra-prop)) (completion-in-region start (point) table pred))))) Can you confirm that this patch fixes it? Stefan === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-10-24 03:22:21 +0000 +++ lisp/minibuffer.el 2012-10-24 17:47:17 +0000 @@ -1114,7 +1114,7 @@ ;; FIXME: Need to deal with the extra-size issue here as well. ;; FIXME: ~/src/emacs/t/lisp/minibuffer.el completes to ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. - (let* ((start (field-beginning)) + (let* ((start (copy-marker (field-beginning))) (end (field-end)) ;; (md (completion--field-metadata start)) (all (completion-all-sorted-completions))