From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16274: 24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...)) Date: Wed, 19 Feb 2014 21:09:59 -0800 (PST) Message-ID: <00fca856-c9f0-4fe4-9b28-d2a4eb578980@default> References: <0d02f1f6-f984-4da4-b077-43408a24c046@default> <26aaf609-dcdc-4585-ae7e-55e7f7025947@default> <87zjlzei7q.fsf@building.gnus.org> <6d8c4718-3a26-4ede-8699-66997536721a@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1392873080 14560 80.91.229.3 (20 Feb 2014 05:11:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 05:11:20 +0000 (UTC) Cc: 16274@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 20 06:11:23 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 1WGLut-0003qP-44 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 06:11:23 +0100 Original-Received: from localhost ([::1]:36226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGLus-00005q-IH for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 00:11:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGLuh-0008SR-5H for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 00:11:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGLuY-0005Zk-IG for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 00:11:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGLuY-0005Zg-Ey for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 00:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGLuX-0005tn-T0 for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 00:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 05:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16274 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16274-submit@debbugs.gnu.org id=B16274.139287301122604 (code B ref 16274); Thu, 20 Feb 2014 05:11:01 +0000 Original-Received: (at 16274) by debbugs.gnu.org; 20 Feb 2014 05:10:11 +0000 Original-Received: from localhost ([127.0.0.1]:32880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGLti-0005sV-JC for submit@debbugs.gnu.org; Thu, 20 Feb 2014 00:10:11 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:38987) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGLtf-0005sA-Ts for 16274@debbugs.gnu.org; Thu, 20 Feb 2014 00:10:08 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1K5A1Rm028474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Feb 2014 05:10:01 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1K59xJq001266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Feb 2014 05:10:00 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1K59xMP017736; Thu, 20 Feb 2014 05:09:59 GMT In-Reply-To: <6d8c4718-3a26-4ede-8699-66997536721a@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] 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:85926 Archived-At: > > Drew, any news on this bug? An update, but I'm not sure whether it is the exact same problem I have seen before. After changing some of my code recently, and doing something different, I can now get such an assertion violation. If I turn off icomplete-mode then the problem goes away. The assertion violation occurs in `completion--nth-completion', after (when (completion-metadata-get metadata 'completion--unquote-requote). I inserted this debug code just after that arg to `when': (message "N: %S, STRING: %S, TABLE: %S, PRED: %S, POINT: %S, METADATA: %S" n string table pred point metadata) (cl-assert (functionp table) nil "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D INVAL= ID FUNCTION =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D") This is what I see in *Messages* (I've added some newlines for the mail): N: 2, STRING: "ls", TABLE: read-file-name-internal, PRED: file-exists-p, POINT: 2, METADATA: (metadata (category . file) (completion--unquote-requot= e . t)) N: 1, STRING: "ls", TABLE: (#("ls-lisp+.el" 0 1 (face completions-common-pa= rt) 1 2 (face completions-common-part) 2 3 (face (completions-first-difference= ))) #("ls-lisp-20.el" 0 1 (face completions-common-part) 1 2 (face completions-common-part) 2 3 (face (completions-first-difference))))= , PRED: nil, POINT: 2, METADATA: (metadata (category . file) (completion--unquote-requote . t)) Error in post-command-hook (icomplete-post-command-hook): (error "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D INVALID = FUNCTION =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D") There are two calls to `completion--nth-completion' here, of which the first (which I guess corresponds to `completion-all-completions') goes OK. For the second (which I guess corresponds to `completion-try-completion'), arg TABLE is a list of (propertized) strings, not a function. I do not understand this code very well. Hope this sheds some light for yo= u. I doubt if describing what I was doing at the time will help, but here it is, just in case: With my code (Icicles), I use a different kind of completion for `!' in Dired (e.g.). It is file-name completion (against program files in the path etc.), but the minibuffer history in this case is `shell-command-history'. I hit `!' on a file in Dired, then hit `M-p' to access the first item of the history, which was `ls' (which matches a couple of file names). It was when I hit `M-p' that I got the assertion violation. The same thing happened using my icomplete+.el and using vanilla icomplete.el. With a little more debug I determined that it is the second call to `completion-try-completion' that causes the problem: the one that is used when BASE-SIZE is not > 0. In this case, BASE-SIZE =3D 0, so this code is executed: ;; If the `comps' are 0-based, the result should be the same with `comps'. (completion-try-completion name comps nil (length name) md))) The problem is apparently that COMPS is a list of strings (file names), not a function. HTH. Let me know if you have further debugging suggestions or need more info.