From: Mark Oteiza <mvoteiza@udel.edu>
To: npostavs@users.sourceforge.net
Cc: 24966@debbugs.gnu.org
Subject: bug#24966: 26.0.50;
Date: Mon, 21 Nov 2016 14:42:26 -0500 [thread overview]
Message-ID: <20161121194226.GA4011@holos.localdomain> (raw)
In-Reply-To: <87fumljw98.fsf@users.sourceforge.net>
On 20/11/16 at 11:24pm, npostavs@users.sourceforge.net wrote:
> unarchive 23533
> # It was marked for 25.2 before master was renumbered to 26
> notfixed 23533 25.2
> fixed 23533 26.0.50
> retitle 24966 26.0.50; test-completion with alist COLLECTION calls PREDICATE incorrectly
> tags 24966 confirmed
> quit
>
> Mark Oteiza <mvoteiza@udel.edu> writes:
>
> > Hi,
> >
> > dd98ee8992c3246861e44 appears to be the culprit for breaking the
> > following from -Q:
>
> Yup, I didn't fix test-completion correctly.
>
> >
> > 1. C-x C-f /tmp/foo.tex
> > 2. M-x reftex-mode
> > 3. Insert the following: \label{foobar}
> > 4. M-x reftex-goto-label
> >
> > and, when attempting to complete, a wrong-type-argument error occurs.
> >
> > Debugger entered--Lisp error: (wrong-type-argument listp "argh")
> > #[(x) "\b@;\207" [x] 1]("argh")
> > test-completion("argh" ((xr nil "\\\\\\\\\\\\") (index-tags) (is-multi nil) (bibview-cache) (master-dir . "/tmp/") (label-numbers) (bof "/tmp/lol.tex") ("argh" "s" " " "/tmp/lol.tex" nil) (eof "/tmp/lol.tex")) #[(x) "\b@;\207" [x] 1])
>
> I tentatively suggest the patch below, but I want to add some tests
> before commiting anything.
>
> diff --git i/src/minibuf.c w/src/minibuf.c
> index 57eea05..fe187b3 100644
> --- i/src/minibuf.c
> +++ w/src/minibuf.c
> @@ -1686,8 +1686,6 @@ DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0,
> tem = Fassoc_string (string, collection, completion_ignore_case ? Qt : Qnil);
> if (NILP (tem))
> return Qnil;
> - else if (CONSP (tem))
> - tem = XCAR (tem);
> }
> else if (VECTORP (collection))
> {
> @@ -1765,14 +1763,16 @@ DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0,
> /* Reject this element if it fails to match all the regexps. */
> if (CONSP (Vcompletion_regexp_list))
> {
> + Lisp_Object temstr = (CONSP (tem)) ? XCAR (tem) : tem;
> + if (SYMBOLP (temstr))
> + temstr = string;
> +
> ptrdiff_t count = SPECPDL_INDEX ();
> specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil);
> for (regexps = Vcompletion_regexp_list; CONSP (regexps);
> regexps = XCDR (regexps))
> {
> - if (NILP (Fstring_match (XCAR (regexps),
> - SYMBOLP (tem) ? string : tem,
> - Qnil)))
> + if (NILP (Fstring_match (XCAR (regexps), temstr, Qnil)))
> return unbind_to (count, Qnil);
> }
> unbind_to (count, Qnil);
>
Thanks, this does indeed fix the recipe.
next prev parent reply other threads:[~2016-11-21 19:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-19 10:26 bug#24966: 26.0.50; Mark Oteiza
2016-11-21 4:24 ` npostavs
2016-11-21 19:42 ` Mark Oteiza [this message]
2016-11-27 20:24 ` bug#24966: 26.0.50; test-completion with alist COLLECTION calls PREDICATE incorrectly npostavs
2016-11-28 20:59 ` Mark Oteiza
2016-11-28 21:03 ` Noam Postavsky
2016-11-29 3:31 ` npostavs
2016-11-30 2:04 ` Mark Oteiza
2016-12-06 1:50 ` Mark Oteiza
2016-12-07 3:31 ` npostavs
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=20161121194226.GA4011@holos.localdomain \
--to=mvoteiza@udel.edu \
--cc=24966@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
/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).