all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jorgen Schaefer <forcer@forcix.cx>
Cc: 12619@debbugs.gnu.org
Subject: bug#12619: completion-at-point and changing buffer
Date: Wed, 10 Oct 2012 20:37:42 -0400	[thread overview]
Message-ID: <jwv8vbdonmt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20121010213913.46dc940b@forcix.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Wed, 10 Oct 2012 21:39:13 +0200")

> 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






  reply	other threads:[~2012-10-11  0:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 19:39 bug#12619: completion-at-point and changing buffer Jorgen Schaefer
2012-10-11  0:37 ` Stefan Monnier [this message]
2012-10-11 18:19   ` Jorgen Schaefer
2012-10-24  3:19     ` Stefan Monnier
2012-10-24 16:35       ` Jorgen Schaefer
2012-10-24 17:48         ` Stefan Monnier
2012-10-24 18:58           ` Jorgen Schaefer
2012-10-24 19:40             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8vbdonmt.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12619@debbugs.gnu.org \
    --cc=forcer@forcix.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.