From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 16274@debbugs.gnu.org
Subject: bug#16274: 24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...))
Date: Wed, 19 Feb 2014 21:09:59 -0800 (PST) [thread overview]
Message-ID: <00fca856-c9f0-4fe4-9b28-d2a4eb578980@default> (raw)
In-Reply-To: <6d8c4718-3a26-4ede-8699-66997536721a@default>
> > Drew, any news on this bug?
An update, but I'm not sure whether it is the exact same problem I
have seen before. After changing some of my code recently, and doing
something different, I can now get such an assertion violation.
If I turn off icomplete-mode then the problem goes away.
The assertion violation occurs in `completion--nth-completion', after
(when (completion-metadata-get metadata 'completion--unquote-requote).
I inserted this debug code just after that arg to `when':
(message "N: %S, STRING: %S, TABLE: %S, PRED: %S, POINT: %S, METADATA: %S"
n string table pred point metadata)
(cl-assert (functionp table) nil
"=================== INVALID FUNCTION ==================")
This is what I see in *Messages* (I've added some newlines for the mail):
N: 2, STRING: "ls", TABLE: read-file-name-internal, PRED: file-exists-p,
POINT: 2, METADATA: (metadata (category . file) (completion--unquote-requote . t))
N: 1, STRING: "ls", TABLE: (#("ls-lisp+.el" 0 1 (face completions-common-part)
1 2 (face completions-common-part) 2 3 (face (completions-first-difference)))
#("ls-lisp-20.el" 0 1 (face completions-common-part) 1 2
(face completions-common-part) 2 3 (face (completions-first-difference)))),
PRED: nil, POINT: 2, METADATA: (metadata (category . file)
(completion--unquote-requote . t))
Error in post-command-hook (icomplete-post-command-hook):
(error "=================== INVALID FUNCTION ==================")
There are two calls to `completion--nth-completion' here, of which the
first (which I guess corresponds to `completion-all-completions') goes OK.
For the second (which I guess corresponds to `completion-try-completion'),
arg TABLE is a list of (propertized) strings, not a function.
I do not understand this code very well. Hope this sheds some light for you.
I doubt if describing what I was doing at the time will help, but here
it is, just in case:
With my code (Icicles), I use a different kind of completion for `!'
in Dired (e.g.). It is file-name completion (against program files in
the path etc.), but the minibuffer history in this case is
`shell-command-history'. I hit `!' on a file in Dired, then hit `M-p'
to access the first item of the history, which was `ls' (which matches
a couple of file names). It was when I hit `M-p' that I got the assertion
violation.
The same thing happened using my icomplete+.el and using vanilla
icomplete.el.
With a little more debug I determined that it is the second call to
`completion-try-completion' that causes the problem: the one that
is used when BASE-SIZE is not > 0. In this case, BASE-SIZE = 0, so
this code is executed:
;; If the `comps' are 0-based, the result should be the same with `comps'.
(completion-try-completion name comps nil (length name) md)))
The problem is apparently that COMPS is a list of strings (file names),
not a function.
HTH. Let me know if you have further debugging suggestions or need
more info.
next prev parent reply other threads:[~2014-02-20 5:09 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00fca856-c9f0-4fe4-9b28-d2a4eb578980@default \
--to=drew.adams@oracle.com \
--cc=16274@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.