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, 10 Oct 2012 20:37:42 -0400 Message-ID: References: <20121010213913.46dc940b@forcix.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349915906 13049 80.91.229.3 (11 Oct 2012 00:38:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 00:38:26 +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 Thu Oct 11 02:38:32 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 1TM6nH-000704-W8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 02:38:32 +0200 Original-Received: from localhost ([::1]:35784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM6nB-0003e6-O9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Oct 2012 20:38:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM6n8-0003dq-N1 for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:38:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TM6n7-00021Z-LE for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:38:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM6n7-00021V-HY for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:38:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TM6nm-0001UG-Pn for bug-gnu-emacs@gnu.org; Wed, 10 Oct 2012 20:39: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: Thu, 11 Oct 2012 00:39: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.13499159125677 (code B ref 12619); Thu, 11 Oct 2012 00:39:02 +0000 Original-Received: (at 12619) by debbugs.gnu.org; 11 Oct 2012 00:38:32 +0000 Original-Received: from localhost ([127.0.0.1]:38355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM6nI-0001TW-D6 for submit@debbugs.gnu.org; Wed, 10 Oct 2012 20:38:32 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53810) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM6nG-0001TF-Gy for 12619@debbugs.gnu.org; Wed, 10 Oct 2012 20:38:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FxLQG/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="201063676" Original-Received: from 69-196-180-6.dsl.teksavvy.com (HELO ceviche.home) ([69.196.180.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Oct 2012 20:37:42 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7C9A7660CA; Wed, 10 Oct 2012 20:37:42 -0400 (EDT) In-Reply-To: <20121010213913.46dc940b@forcix.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Wed, 10 Oct 2012 21:39:13 +0200") 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:65475 Archived-At: > When using cycle completion (using `completion-cycle-threshold'), the > completion cycle gets aborted if the buffer contents are modified. For > an IRC buffer, this means that the completion cycle terminates when new > text arrives. The same problem should be the case for other > process-related buffers, like shells with regular output or similar. Indeed, good point. > First, in `completion-at-point', `completion-in-region-mode-predicate' > is set to a function that compares the old start value with the new > using `eq'. This prevents markers to work in this case. Simply > replacing `eq' with `=' means markers work, so the positions used by > completion just move together with text changes. Sounds OK, tho we should make sure that those values can't be nil or some other non-numeric thingy. > Second, `completion--cache-all-sorted-completions' adds a function to > `after-change-functions' that cleans up the cache of sorted > completions. I'm not entirely sure why it does so, but my patch adds > that function only if not both of the returned positions are markers. Hmm...but if the buffer modification happens right in the middle of the completion text what should we do? Should we really ignore this modification? Stefan