From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#16274: 24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...)) Date: Sun, 22 Oct 2017 17:06:35 +0200 Message-ID: References: <0d02f1f6-f984-4da4-b077-43408a24c046@default> <26aaf609-dcdc-4585-ae7e-55e7f7025947@default> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1508684837 31421 195.159.176.226 (22 Oct 2017 15:07:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Oct 2017 15:07:17 +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 Sun Oct 22 17:07:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6HqE-0006aV-2P for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 17:07:06 +0200 Original-Received: from localhost ([::1]:33239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6HqI-0003El-Q1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 11:07:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6HqD-0003Ef-B9 for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 11:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6HqA-0004qw-4U for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 11:07:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6Hq9-0004qe-TB for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 11:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6Hq9-0007Y8-JQ for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 11:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Oct 2017 15:07: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: confirmed Original-Received: via spool by 16274-submit@debbugs.gnu.org id=B16274.150868477928967 (code B ref 16274); Sun, 22 Oct 2017 15:07:01 +0000 Original-Received: (at 16274) by debbugs.gnu.org; 22 Oct 2017 15:06:19 +0000 Original-Received: from localhost ([127.0.0.1]:56025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6HpS-0007X9-Ru for submit@debbugs.gnu.org; Sun, 22 Oct 2017 11:06:19 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:58526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6HpQ-0007Wt-UA for 16274@debbugs.gnu.org; Sun, 22 Oct 2017 11:06:17 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 38D6622573 for <16274@debbugs.gnu.org>; Sun, 22 Oct 2017 14:59:22 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1508684360; x=1509548361; bh=GTxnvJ2UcxnGu rekJJrQxEGy5BYQ06T2ZXvo3jPT7kY=; b=jC5aZPZPCFp4z0OOdgp5yz7h44A+Q pddlsFMkTBijc+WsOxpMuEvmpgi7thrSs85V+dxBerm050PRld0znuABsg85EepU uAtbGMbbOIZq3fKyJxqXmSG2K1oNiirhNcCr2MFrE7GgmmlTOtbpDxc9CsaTqE5W CuXfligm1jSLdI= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Q-8aMdLnQtSe for <16274@debbugs.gnu.org>; Sun, 22 Oct 2017 14:59:20 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id A03D022564; Sun, 22 Oct 2017 14:59:17 +0000 (UTC) In-reply-to: (message from Stefan Monnier on Fri, 03 Jan 2014 23:51:48 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:138854 Archived-At: > From: Stefan Monnier > Date: Fri, 03 Jan 2014 23:51:48 -0500 > > > 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. This seems to be the mistake. If you pass nil instead of `md' (as in the patch below), then there's no more problem. diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 038f58f..38be657 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -395,7 +395,7 @@ icomplete-completions ;; If the `comps' are 0-based, the result should be ;; the same with `comps'. (completion-try-completion - name comps nil (length name) md))) + name comps nil (length name) nil))) (most (if (consp most-try) (car most-try) (if most-try (car comps) ""))) ;; Compare name and most, so we can determine if name is Alternatively, this part of `completion--nth-completion' could be updated to respond to `completio--unquote-requote' in the completion metadata when `table' is not a function: (when (completion-metadata-get metadata 'completion--unquote-requote) (cl-assert (functionp table)) (let ((new (funcall table string point 'completion--unquote))) (No idea if that would make sense.) I was using this recipe for testing: > Date: Fri, 30 Jan 2015 14:25:04 +0000 > From: Jeremy Moore > > Hi folks, > > I get a similar error by following this sequence in 24.4.1: > 1. emacs -Q > 2. M-x icomplete-mode > 3. M-x set-variable icomplete-show-matches-on-no-input t > 4. C-x C-f C-a C-k > > Version and settings are below. > > Regards, > Jeremy > > In GNU Emacs 24.4.1 (i686-pc-mingw32) > of 2014-10-24 on LEG570 > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > Configured using: > `configure --prefix=/c/usr'