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#11906: 24.1; completion-at-point failures Date: Wed, 22 May 2013 15:16:01 -0400 Message-ID: References: <87li776gym.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369250212 22146 80.91.229.3 (22 May 2013 19:16:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 19:16:52 +0000 (UTC) Cc: Leo Liu , 11906@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 22 21:16:50 2013 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 1UfEWU-0002LY-Ot for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2013 21:16:30 +0200 Original-Received: from localhost ([::1]:39957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfEWU-0008Us-6Z for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2013 15:16:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfEWM-0008UY-EE for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 15:16:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfEWH-0001ke-7C for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 15:16:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfEWH-0001kX-45 for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 15:16:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UfEX0-0007b6-6n for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 15:17: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, 22 May 2013 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11906 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11906-submit@debbugs.gnu.org id=B11906.136925021729191 (code B ref 11906); Wed, 22 May 2013 19:17:02 +0000 Original-Received: (at 11906) by debbugs.gnu.org; 22 May 2013 19:16:57 +0000 Original-Received: from localhost ([127.0.0.1]:56665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfEWv-0007am-9T for submit@debbugs.gnu.org; Wed, 22 May 2013 15:16:57 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28068) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfEWt-0007aP-ID for 11906@debbugs.gnu.org; Wed, 22 May 2013 15:16:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="14142418" Original-Received: from 69-165-154-5.dsl.teksavvy.com (HELO ceviche.home) ([69.165.154.5]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 May 2013 15:15:58 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id A361566107; Wed, 22 May 2013 15:16:01 -0400 (EDT) In-Reply-To: <87li776gym.fsf@yandex.ru> (Dmitry Gutov's message of "Wed, 22 May 2013 03:39:13 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.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.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:74457 Archived-At: >>>> The difference between 2 and 3 calls shouldn't be sufficiently large to >>>> go from "acceptable" to "terrible delay". >>> It is a difference between 1 and 3 calls because a user can also run >>> octave in terminal and find that how responsive it actually is. >> But the generic completion code can't easily go down to a single call in >> the general case. > Why not? Because the first call is for try-completion (i.e. "give me the completion") and the second is for all-completions (i.e. "give me all matching candidates"), so the info returned by the first call is not sufficient to avoid the second call. As you've seen there can be a second call (to try-completion with the result of the first call to try-completion) to check if the completion is unique. Plus another call (to test-completion) to check if the result of the first try-completion was complete. > So, suppose we do provide a caching function. Would it cache more than > just one pair? Probably, yes. It would turn test-completion and try-completion into calls to all-completions and then cache one "arg+result" of all-completions (this pair would be sufficient to cover all calls to test/try/all-completion for any argument string which has `arg' as its prefix). > If not, it won't be too hard to do in > `completion-table-dynamic', or in an additional function that would wrap > FUN and then pass it to `completion-table-dynamic'. Right, that's the idea. Stefan