From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: 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-ID: <5339B1E5.8020900@dancol.org> References: <53362D5C.2070502@dancol.org> <53363260.9060207@dancol.org> <53389187.3090901@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fIipVBP8MPBtH2m1KBFmaVNOGaoefdJN4" X-Trace: ger.gmane.org 1396290093 27796 80.91.229.3 (31 Mar 2014 18:21:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Mar 2014 18:21:33 +0000 (UTC) Cc: 17139@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 31 20:21:27 2014 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 1WUgpk-0005M7-C2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Mar 2014 20:21:20 +0200 Original-Received: from localhost ([::1]:50645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUgpj-0003yl-SS for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Mar 2014 14:21:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUgpZ-0003xO-BM for bug-gnu-emacs@gnu.org; Mon, 31 Mar 2014 14:21:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUgpS-0000Mr-OE for bug-gnu-emacs@gnu.org; Mon, 31 Mar 2014 14:21:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUgpS-0000Mm-FB for bug-gnu-emacs@gnu.org; Mon, 31 Mar 2014 14:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WUgpR-00029a-RE for bug-gnu-emacs@gnu.org; Mon, 31 Mar 2014 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Mar 2014 18:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17139-submit@debbugs.gnu.org id=B17139.13962900278221 (code B ref 17139); Mon, 31 Mar 2014 18:21:01 +0000 Original-Received: (at 17139) by debbugs.gnu.org; 31 Mar 2014 18:20:27 +0000 Original-Received: from localhost ([127.0.0.1]:58173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUgos-00028X-O7 for submit@debbugs.gnu.org; Mon, 31 Mar 2014 14:20:27 -0400 Original-Received: from dancol.org ([96.126.100.184]:56351) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUgoq-00028O-Go for 17139@debbugs.gnu.org; Mon, 31 Mar 2014 14:20:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=XgX0p/BidtPKl8VMTqlsY9G5RV2sMmk9dQ/3Ce/emqg=; b=cHlrdogTSPxu+Mz5C4XRiQ/p9dEezjFRJ0HPCE+sbLVWv0Dwb3qk+BBupAhFV4JVupfxW7cKzNt2WX6djR46GcgqwQpqJa8K6eAdlPULfeIn/MT+XSdxMlPLI+WgKcXy9j+gKTQ58C3P1xfF1mBvlUX+xuPTw0baDGaC6HkNuTrnbIYJf02Vr0nqdBFpHwi1nzTTCbB4e/i41/6jgTy5TF4lgqAXZXlDm6iQYstWqFv+wG6G1TNVbArIlSGFvaXigcyKVeKcTWyPEXv58PGNQVQUz4l3sMpH+NsZ3//FdsxLTJtDEF5Hv+MifVlkG9CFTFJpx6tvnF8YHNslGkg0JQ==; Original-Received: from c-24-19-133-76.hsd1.wa.comcast.net ([24.19.133.76] helo=[192.168.1.50]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WUgop-0001oF-6B; Mon, 31 Mar 2014 11:20:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:87577 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fIipVBP8MPBtH2m1KBFmaVNOGaoefdJN4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. --fIipVBP8MPBtH2m1KBFmaVNOGaoefdJN4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTObHlAAoJEMAaIROpHW7IIVcP/3AMHJK78wPG8IDj/C5SL2oV frybcL92LIfVeO2ub2r6eqlEKPb2TpLXZl8+70F2VgS1uciw69xPnmhpyzoMaI7d pattrrwhxj1q9MKXCz2q3b0H83G5M8vz+NLSxq7yxJ+SfiaU5I3fdZqNXZaYCkyz O/HqloitZZZlQRoweJAPIAeESwAQ3f1ZjhDQFI1lDEfgghSZpqRnQ9l1uqQkYy1l AN2yVRXu9vl+DL07Qp9J+BBCgt1eW4ocEsfG36fIpmlKZ7bIAFQB70Gj+YbpgAea tsX5djQXXG2jmctW9qbuAlkRvgHZooHE4KhCXUR8UEXfZybfzpb/22ccCfhTa8wO W9ZbmYj9AgsDzAt4CfCQN7hThFwmFmhCH7rDH16BUovBnR70zj00Agu5vixmq35z q6VGOTbUmbHt/jZiLNtZlD7LPGnMqweABheaxEStE8Pt0xGevcK2RTe2FopZaHsx 3DE3jkFEtbExtZ1NoXutG6c2u1oqQ+0V5OF3VDayZrqvOt8ZLaZeFmk0Iw0VQ0+C qSmT8CJNzUgHAQ8ElzMHXizEOvm7GgNETAPwlnKkZ3eFWbhuFUmt6+QAXCLux8L7 8LY8ZyWlZeWuobMergZr6T43243qiyxHBk22kpT8Kmcfgj6rScmS5+b72xGjuADi AtOLnKDUiT0LtJ60qUU0 =UPFQ -----END PGP SIGNATURE----- --fIipVBP8MPBtH2m1KBFmaVNOGaoefdJN4--