From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#11906: 24.1; completion-at-point failures Date: Wed, 11 Jul 2012 13:54:00 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341986084 1534 80.91.229.3 (11 Jul 2012 05:54:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2012 05:54:44 +0000 (UTC) To: 11906@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 11 07:54:43 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 1Sopsp-0005EQ-4j for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jul 2012 07:54:43 +0200 Original-Received: from localhost ([::1]:37921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sopso-0003Ia-AR for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jul 2012 01:54:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sopsm-0003IF-1Q for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 01:54:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sopsk-0001U5-90 for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 01:54:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sopsk-0001U1-36 for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 01:54:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sopxy-0004tn-2Z; Wed, 11 Jul 2012 02:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jul 2012 06:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11906 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.134198638618782 (code B ref -1); Wed, 11 Jul 2012 06:00:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jul 2012 05:59:46 +0000 Original-Received: from localhost ([127.0.0.1]:32926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sopxh-0004st-M1 for submit@debbugs.gnu.org; Wed, 11 Jul 2012 01:59:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54463) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sopxf-0004sl-UK for submit@debbugs.gnu.org; Wed, 11 Jul 2012 01:59:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SopsP-0001SH-QN for submit@debbugs.gnu.org; Wed, 11 Jul 2012 01:54:19 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:47496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SopsP-0001SC-KL for submit@debbugs.gnu.org; Wed, 11 Jul 2012 01:54:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SopsN-0003Fo-Uf for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 01:54:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SopsM-0001Rt-07 for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 01:54:15 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:47404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SopsL-0001Rc-NU for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2012 01:54:13 -0400 Original-Received: by pbbrp2 with SMTP id rp2so1700654pbb.0 for ; Tue, 10 Jul 2012 22:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:x-debbugs-cc:date:message-id:mime-version :content-type; bh=o2BhljlCH1AU0Z0fodu/Rj3NCxcbbMy7QYpF2fs4+mM=; b=QTpEAcBkRPpZ2bkVO9CO8fS1C4TXCd6Xk3yF4la0lJ3hKKbXAG5amEbm2D0RKEDLH9 guotaEOTWzXDGXp7sdAB0PHjb45AcBPlHX12BT7lPlaQZiVDNb3686pzRdohoYgoC13L 5NTM8rkX/Eo1rLwoh0IYd8k1iz+4KOS+E6FIx8eZWF9zrZSJNPg+U7mXi/LuDdZOLy4m bGfzLq55+n0mXFF/zltGSG4PqcRRoZm/9Nnx+6YC8SyJtsAUCI7EIEgJctg0Rx2u4mPn 8wpY22rDNZHeupfffa0x+wUs2V9sfniz88wk3h2ulJs6TuwGz+vatZLbFtN1EDapQ/94 Ibyw== Original-Received: by 10.68.223.34 with SMTP id qr2mr75204456pbc.10.1341986050488; Tue, 10 Jul 2012 22:54:10 -0700 (PDT) Original-Received: from localhost ([119.255.41.67]) by mx.google.com with ESMTPS id ms1sm1023543pbb.63.2012.07.10.22.54.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Jul 2012 22:54:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:61809 Archived-At: Hello Stefan, Despite these critical points, I have witnessed great improvement over completions in earlier versions of Emacs. So thanks. Assume three candidates (ObjC selectors) for completion and completion-cycle-threshold is 5: 1. stringWithContentsOfFile: 2. stringWithContentsOfFile:encoding:error: 3. stringWithContentsOfFile:usedEncoding:error: After cycling a few times, I see: [NSString stringWithContentsOfFile:stringWithContentsOfFile:encoding:error:stringWithContentsOfFile:usedEncodin$ i.e. succeeding completion failed to remove previous one before inserting its own, it is, in this case, due to : in the completions. But the problem is general, completion-at-point can be tripped over by chars in the completion candidates. I can imagine it fails too if completion contains spaces. I dug a bit and realised that completion-at-point depended too much on members in completion-at-point-functions. Those functions are called multiple times for each trigger of completion. So it can be extremely slow when the calculation is slow. For example, preparing the completion table in ObjC could take a few seconds for libclang to analyse the source and turn the output into something suitable for consumption in Emacs. It seems completion-at-point should be able to do its entire work after obtaining once the data from those functions. This would free users of completion-at-point-functions from worrying about caching. completion-at-point also invokes those functions in order to decide when to exit. This causes problems illustrated at the beginning of this report and, for example, I have also experienced delay in inserting space, dot, etc following a completion. Leo