From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!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: Mon, 06 Nov 2017 23:06:26 -0500 Message-ID: References: <0d02f1f6-f984-4da4-b077-43408a24c046@default> <26aaf609-dcdc-4585-ae7e-55e7f7025947@default> <83zi82toax.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1510027629 23149 195.159.176.226 (7 Nov 2017 04:07:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2017 04:07:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 16274@debbugs.gnu.org, "Charles A. Roelli" To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 07 05:07:06 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 1eBvAI-0005q3-1p for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Nov 2017 05:07:06 +0100 Original-Received: from localhost ([::1]:51316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBvAN-0002wQ-U3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Nov 2017 23:07:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBvAH-0002wG-IY for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 23:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBvAE-0004xs-Am for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 23:07:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBvAE-0004xS-6d for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 23:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eBvAD-00023g-Qc for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2017 23:07: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: Tue, 07 Nov 2017 04: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.15100275997877 (code B ref 16274); Tue, 07 Nov 2017 04:07:01 +0000 Original-Received: (at 16274) by debbugs.gnu.org; 7 Nov 2017 04:06:39 +0000 Original-Received: from localhost ([127.0.0.1]:55028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBv9r-00022y-2h for submit@debbugs.gnu.org; Mon, 06 Nov 2017 23:06:39 -0500 Original-Received: from pmta31.teksavvy.com ([76.10.157.38]:24941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBv9o-00022i-Qk for 16274@debbugs.gnu.org; Mon, 06 Nov 2017 23:06:37 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2EQBAAAMAFa/4XnjBhcHAEBBAEBCgEBgzSBUp9gE5hECoU7AoRpQxQBAQEBAQEBAQEDaCiFHwEEAXkQCw0nBwsUGDGKLgirfCECinEBAQEBBgIBJYMuggeGZosIBZFegROPHaBjKIcllhmBOTYigWw0IQgySYJlgxAZgVMjjQIBAQE X-IPAS-Result: A2EQBAAAMAFa/4XnjBhcHAEBBAEBCgEBgzSBUp9gE5hECoU7AoRpQxQBAQEBAQEBAQEDaCiFHwEEAXkQCw0nBwsUGDGKLgirfCECinEBAQEBBgIBJYMuggeGZosIBZFegROPHaBjKIcllhmBOTYigWw0IQgySYJlgxAZgVMjjQIBAQE X-IronPort-AV: E=Sophos;i="5.44,356,1505793600"; d="scan'208";a="8331588" Original-Received: from unknown (HELO fmsmemgm.homelinux.net) ([24.140.231.133]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2017 23:06:29 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 52104AE084; Mon, 6 Nov 2017 23:06:26 -0500 (EST) In-Reply-To: <83zi82toax.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Nov 2017 10:56:22 +0200") 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:139551 Archived-At: >> Ping! I hope to fix this for emacs-26 if it's possible. It also >> solves Bug#28898. > Stefan, any objections for pushing this to the emacs-26 branch? Yes, using nil instead of `md` has other undesirable side-effects. E.g. it loses the `category` metadata so it will cause the wrong completion-styles to be used e.g. in C-x b. Does the patch below work around the problem? BTW, thanks Charles for the recipe, Stefan diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f13f1fa798..54a6afeca9 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -896,8 +896,15 @@ completion--nth-completion ;; than from completion-extra-properties) because it may apply only to some ;; part of the string (e.g. substitute-in-file-name). (let ((requote - (when (completion-metadata-get metadata 'completion--unquote-requote) - (cl-assert (functionp table)) + (when (and + (completion-metadata-get metadata 'completion--unquote-requote) + ;; Sometimes a table's metadata is used on another + ;; table (typically that other table is just a list taken + ;; from the output of `all-completions' or something equivalent, + ;; for progressive refinement). + ;; FIXME: Rather than do nothing, we should somehow call + ;; the original table, in that case! + (functionp table)) (let ((new (funcall table string point 'completion--unquote))) (setq string (pop new)) (setq table (pop new))