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#16274: 24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...)) Date: Fri, 03 Jan 2014 23:51:48 -0500 Message-ID: References: <0d02f1f6-f984-4da4-b077-43408a24c046@default> <26aaf609-dcdc-4585-ae7e-55e7f7025947@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1388811135 7329 80.91.229.3 (4 Jan 2014 04:52:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jan 2014 04:52:15 +0000 (UTC) Cc: 16274@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 04 05:52:20 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 1VzJDf-0001wO-FG for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2014 05:52:19 +0100 Original-Received: from localhost ([::1]:53125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzJDf-00034W-5t for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jan 2014 23:52:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzJDV-00034A-Cs for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2014 23:52:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzJDO-0000a6-1v for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2014 23:52:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzJDN-0000a2-UY for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2014 23:52:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VzJDN-0008OM-Lc for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2014 23:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2014 04:52: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.138881111332243 (code B ref 16274); Sat, 04 Jan 2014 04:52:01 +0000 Original-Received: (at 16274) by debbugs.gnu.org; 4 Jan 2014 04:51:53 +0000 Original-Received: from localhost ([127.0.0.1]:32802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VzJDE-0008Nz-OC for submit@debbugs.gnu.org; Fri, 03 Jan 2014 23:51:53 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VzJDC-0008No-01 for 16274@debbugs.gnu.org; Fri, 03 Jan 2014 23:51:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rwsm/2dsb2JhbAA6Crs1g1kXc4IeAQEEAVYjBQsLNAcLFBgNJIgeBsEtjRWDdQOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFG4rwsm/2dsb2JhbAA6Crs1g1kXc4IeAQEEAVYjBQsLNAcLFBgNJIgeBsEtjRWDdQOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="43948435" Original-Received: from 184-175-11-38.dsl.teksavvy.com (HELO pastel.home) ([184.175.11.38]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Jan 2014 23:51:48 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9D9FA6063D; Fri, 3 Jan 2014 23:51:48 -0500 (EST) In-Reply-To: (Drew Adams's message of "Fri, 3 Jan 2014 14:52:01 -0800 (PST)") 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.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:82887 Archived-At: >> > Can you identify the code that issues that error message? >> It's the C code that runs `post-command-hook', AFAIK. > I was looking for the function that issued the `invalid-function' > error. It seems to be `eval_sub' (via `Qinvalid_function'). Right, it's probably eval of funcall. > So no special help there. Indeed. > So far, my best guess is still that in > (completion-try-completion name comps nil (length name) md) > the list COMPS is for some reason being treated as a function (the > second argument can of course be either). Oh, you mean that the error could come from the fact that `md' goes with `candidates', so some code might assume that the completion table is a function based on the `md' data, whereas we passed `comps' which is a list of strings? Hmm... that sounds plausible. > Maybe `completion--nth-completion' (called by > `completion-try-completion') for some reason finds > (completion-metadata-get metadata 'completion--unquote-requote) to be > non-nil, and so calls its TABLE argument, trying to requote? Apply the patch below. That should replace your error message with a different one, so if the error message stays the same, the problem is elsewhere. And if a new message appears we've found a culprit. Of course, minibuffer.el is preloaded, so you'll want to re-dump your Emacs, force reloading minibuffer.el(c) from your .emacs, or do some other dance to make sure you use the new definition of completion--nth-completion. Stefan === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2014-01-01 07:43:34 +0000 +++ lisp/minibuffer.el 2014-01-04 04:48:56 +0000 @@ -819,6 +819,7 @@ ;; part of the string (e.g. substitute-in-file-name). (let ((requote (when (completion-metadata-get metadata 'completion--unquote-requote) + (cl-assert (functionp table)) (let ((new (funcall table string point 'completion--unquote))) (setq string (pop new)) (setq table (pop new))