From: charles@aurox.ch (Charles A. Roelli)
To: charles@aurox.ch (Charles A. Roelli)
Cc: 16274@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#16274: 24.3.50; Error in post-command-hook (icomplete-post-command-hook): (invalid-function ("..." ...))
Date: Wed, 01 Nov 2017 21:02:00 +0100 [thread overview]
Message-ID: <m2vaitahtz.fsf@aurox.ch> (raw)
In-Reply-To: <m2bmkzb4sk.fsf@aurox.ch> (charles@aurox.ch)
Ping! I hope to fix this for emacs-26 if it's possible. It also
solves Bug#28898.
> Date: Sun, 22 Oct 2017 17:06:35 +0200
> From: charles@aurox.ch (Charles A. Roelli)
>
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > 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 <jmoore@ieee.org>
> >
> > 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'
next prev parent reply other threads:[~2017-11-01 20:02 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
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 [this message]
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=m2vaitahtz.fsf@aurox.ch \
--to=charles@aurox.ch \
--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 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).