From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: 16274@debbugs.gnu.org
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 [thread overview]
Message-ID: <jwv1u0opdgg.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <e7a11db8-70b6-41e2-bf96-d54e48fee3e1@default> (Drew Adams's message of "Fri, 3 Jan 2014 14:52:01 -0800 (PST)")
>> > 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))
next prev parent reply other threads:[~2014-01-04 4:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-28 5:52 bug#16274: 24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...)) Drew Adams
2014-01-03 4:23 ` Stefan Monnier
2014-01-03 16:20 ` Drew Adams
2014-01-03 22:14 ` Stefan Monnier
2014-01-03 22:52 ` Drew Adams
2014-01-04 4:51 ` Stefan Monnier [this message]
2014-01-04 7:03 ` Drew Adams
2014-01-04 15:45 ` Drew Adams
2014-02-10 3:53 ` Lars Ingebrigtsen
2014-02-10 16:34 ` Stefan Monnier
2014-02-10 20:55 ` Drew Adams
2014-02-20 5:09 ` Drew Adams
2014-07-19 21:51 ` Drew Adams
2015-12-26 3:40 ` Drew Adams
2017-02-03 15:49 ` Drew Adams
2017-10-22 15:06 ` Charles A. Roelli
2017-11-01 20:02 ` Charles A. Roelli
2017-11-04 8:56 ` Eli Zaretskii
2017-11-07 4:06 ` Stefan Monnier
2017-11-11 10:09 ` Eli Zaretskii
2017-11-11 10:31 ` Charles A. Roelli
2017-11-11 10:41 ` Eli Zaretskii
2017-11-11 15:25 ` Stefan Monnier
2015-01-30 14:25 ` bug#16274: ; One method to produce an error in icomplete-post-command-hook Jeremy Moore
2015-08-11 19:02 ` bug#16274: Can still reproduce in Emacs 24.5.2/x86_64-unknown-linux-gnu Michael Hoffman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv1u0opdgg.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16274@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).