From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.bugs Subject: bug#24966: 26.0.50; Date: Mon, 21 Nov 2016 14:42:26 -0500 Message-ID: <20161121194226.GA4011@holos.localdomain> References: <87shqnpxym.fsf@udel.edu> <87fumljw98.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1479757398 10518 195.159.176.226 (21 Nov 2016 19:43:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2016 19:43:18 +0000 (UTC) User-Agent: Mutt/1.7.1+41 (5382e1e4cee1) (2016-10-04) Cc: 24966@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 21 20:43:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8uUf-0001GI-L9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 20:43:09 +0100 Original-Received: from localhost ([::1]:51448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8uUj-0003iY-8k for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 14:43:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8uUd-0003ho-1x for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 14:43:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8uUZ-00039a-Qx for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 14:43:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8uUZ-00039N-N6 for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 14:43:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c8uUY-0004Jr-HT for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 14:43:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2016 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24966 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 24966-submit@debbugs.gnu.org id=B24966.147975735616569 (code B ref 24966); Mon, 21 Nov 2016 19:43:02 +0000 Original-Received: (at 24966) by debbugs.gnu.org; 21 Nov 2016 19:42:36 +0000 Original-Received: from localhost ([127.0.0.1]:37395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8uU7-0004JB-TK for submit@debbugs.gnu.org; Mon, 21 Nov 2016 14:42:36 -0500 Original-Received: from mail-qt0-f171.google.com ([209.85.216.171]:33665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8uU5-0004Iw-HX for 24966@debbugs.gnu.org; Mon, 21 Nov 2016 14:42:34 -0500 Original-Received: by mail-qt0-f171.google.com with SMTP id p16so209874915qta.0 for <24966@debbugs.gnu.org>; Mon, 21 Nov 2016 11:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=OHNrl1CYNcOl9Ic6XvzJhXHgqZGV/x6EHCxWEUTViSY=; b=wUaTJxESTsapfKD3supROC57buP7a7WNYeSyee8IHnn/zNo1DQGxtYaeQenPSNMKM7 zKQ9BXwiFo2Xnu/ElUEL+cnHnd+EaouKTrH/keFoY6Aa8mM3mINoDiQCpSzuJvQurbL2 5J9gUFURFssniAftLlwzRP6WzoOrz8wethGOWIjq80Ve5dy6yOKGamuJcydRMT6WJ/Jg LVIXjImCUo36mDWYZuxRTjeGpqMFFkE5EDo7mTMN/BTtIAo9bwxOlS2Kng5J1sKPYJa8 /qRr/23RTQbUS/o7VzHcgb01lwIROrfnxTBjPUD2PVtPhQqO2eEVVLxKY7aLCZrR97Pq 5nJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=OHNrl1CYNcOl9Ic6XvzJhXHgqZGV/x6EHCxWEUTViSY=; b=WiIFDXmCE9KNfVO3fNYz8RXC/TEg9wyBSKIV3h3Kvdut3RCbJCIGTWg+QSql+1yLtd KWytUyMNFFnRpifdE/cM+dW6a/XOAc78Dq7KHtKMFL7W/WbcpW8Xb2xnerZdxijBmwPX EQ+aKUx1AjGSs4PFVZnDptRfINn22xz3B6SNx4SzN+qWjQhNEYMXokaGkWCwZ4bN1JgJ FEHnsB7xHo4oeKsXJlpTPwnN0UGtHPvkbevg17Q2v3UDHvSl3ZXrNYyNFquzkwveGhoy FmaUP8MlvvxMcqwT8hI73NU+JCeL5HY3rPIFjVcegRsZl1id7gVGcNkwt1Nal0piskGY 1Dag== X-Gm-Message-State: AKaTC013wLcJC4iIKpKgo66BZtvH8fldvlhhQ6TCxATmO3YiSG4a0s6jeyOZ9G74kXwvenJf X-Received: by 10.237.53.237 with SMTP id d42mr9177120qte.229.1479757347938; Mon, 21 Nov 2016 11:42:27 -0800 (PST) Original-Received: from holos.localdomain ([69.250.222.218]) by smtp.gmail.com with ESMTPSA id 21sm5876837qkf.17.2016.11.21.11.42.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Nov 2016 11:42:26 -0800 (PST) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 211B566324; Mon, 21 Nov 2016 14:42:26 -0500 (EST) Content-Disposition: inline In-Reply-To: <87fumljw98.fsf@users.sourceforge.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125961 Archived-At: 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 PREDIC= ATE incorrectly > tags 24966 confirmed > quit >=20 > Mark Oteiza writes: >=20 > > Hi, > > > > dd98ee8992c3246861e44 appears to be the culprit for breaking the > > following from -Q: >=20 > Yup, I didn't fix test-completion correctly. >=20 > > > > 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) "=08@;\207" [x] 1]("argh") > > test-completion("argh" ((xr nil "\\\\\\\\\\\\") (index-tags) (is-mult= i nil) (bibview-cache) (master-dir . "/tmp/") (label-numbers) (bof "/tmp/lo= l.tex") ("argh" "s" " " "/tmp/lol.tex" nil) (eof "/tmp/lol.tex")) #[(x) "= =08@;\207" [x] 1]) >=20 > I tentatively suggest the patch below, but I want to add some tests > before commiting anything. >=20 > 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_c= ompletion, 2, 3, 0, > tem =3D Fassoc_string (string, collection, completion_ignore_case = ? Qt : Qnil); > if (NILP (tem)) > return Qnil; > - else if (CONSP (tem)) > - tem =3D 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 =3D (CONSP (tem)) ? XCAR (tem) : tem; > + if (SYMBOLP (temstr)) > + temstr =3D string; > + > ptrdiff_t count =3D SPECPDL_INDEX (); > specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil); > for (regexps =3D Vcompletion_regexp_list; CONSP (regexps); > regexps =3D 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); >=20 Thanks, this does indeed fix the recipe.