From: "Drew Adams" <drew.adams@oracle.com>
To: 14153@debbugs.gnu.org
Subject: bug#14153: 24.3.50; regression: `crm--choose-completion-string' expects wrong args
Date: Sat, 6 Apr 2013 14:25:34 -0700 [thread overview]
Message-ID: <9A0D74D4FB64407CB482839873E8B61D@us.oracle.com> (raw)
A regression introduced in Emacs 23. There is no problem before 23.
`completing-read-multiple' adds `crm--choose-completion-string' to
`choose-completion-string-functions'.
But `crm--choose-completion-string' has the wrong signature for a
function on `choose-completion-string-functions'.
Each such function should accept 4 args, as follows:
CHOICE - the string to insert in the buffer,
BUFFER - the buffer in which the choice should be inserted,
MINI-P - non-nil if BUFFER is a minibuffer, and
BASE-SIZE - the number of characters in BUFFER before
the string being completed.
But `crm--choose-completion-string' expects these args:
(CHOICE BUFFER BASE-POSITION &rest IGNORED)
In particular, it expects the third arg to be a position,
not a Boolean indicator of whether BUFFER is a minibuffer.
If the BUFFER is a minibuffer, so that MINI-P is non-nil
(e.g. `t'), then `crm--choose-completion-string'
mistakenly interprets that value as the BASE-POSITION.
In code that I have this leads to this kind of error:
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p t)
choose-completion-string("mode-line" #<buffer *Minibuf-1*> t)
crm--choose-completion-string("mode-line" #<buffer *Minibuf-1*> t nil)
run-hook-with-args-until-success(crm--choose-completion-string "mode-line"
#<buffer *Minibuf-1*> t nil)
Presumably no one has run into this because their code hasn't passed t
as the value of MINI-P (?).
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2013-04-02 on ODIEONE
Bzr revision: 112212 cyd@gnu.org-20130402033331-sqegwhqh7u1o0ars
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
next reply other threads:[~2013-04-06 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-06 21:25 Drew Adams [this message]
2013-04-07 0:46 ` bug#14153: 24.3.50; regression: `crm--choose-completion-string' expects wrong args Stefan Monnier
2013-04-07 2:00 ` Drew Adams
2013-04-07 2:09 ` Drew Adams
2014-02-08 12:46 ` Lars Ingebrigtsen
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=9A0D74D4FB64407CB482839873E8B61D@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=14153@debbugs.gnu.org \
/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.