GNU bug report logs -
#16274
24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...))
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sat, 28 Dec 2013 05:53:02 UTC
Severity: normal
Tags: confirmed
Found in versions 25.1, 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 16274 <at> debbugs.gnu.org (full text, mbox):
>> > 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))
This bug report was last modified 7 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.