GNU bug report logs - #17139
Race condition in complete-in-region: should we be using pre-command-hook, not post-command-hook?

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Sat, 29 Mar 2014 02:19:02 UTC

Severity: normal

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 17139 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 17139 <at> debbugs.gnu.org
Subject: Re: bug#17139: Race condition in complete-in-region: should we be
 using pre-command-hook, not post-command-hook?
Date: Mon, 31 Mar 2014 11:20:21 -0700
[Message part 1 (text/plain, inline)]
On 03/31/2014 05:40 AM, Stefan Monnier wrote:
>> Come to think of it, supplying a function instead of a simple list of
>> strings as the completion table returned from the completion function
>> would probably help too, since then completion-in-region--postch could
>> inspect the first element of the returned list (the completion region
>> start) without having to actually "force the promise" and resolve the
>> whole list after every command.
> 
> Exactly: completion-in-region--postch does not need to know the
> candidates.  If you need a subprocess to get the list of candidates,
> then foo-at-point-function is usually not the right place/time to build
> this list, you should use completion-table-dynamic,
> completion-table-with-cache, or something like that instead.

I've added some recommendations to this effect to the manual.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 8 years and 348 days ago.

Previous Next


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