From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24966: 26.0.50; Date: Sun, 20 Nov 2016 23:24:19 -0500 Message-ID: <87fumljw98.fsf@users.sourceforge.net> References: <87shqnpxym.fsf@udel.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479702256 25119 195.159.176.226 (21 Nov 2016 04:24:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2016 04:24:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 24966@debbugs.gnu.org To: Mark Oteiza Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 21 05:24:13 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 1c8g9L-0005h3-2e for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 05:24:11 +0100 Original-Received: from localhost ([::1]:47301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8g9M-0001ks-WB for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Nov 2016 23:24:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8g9F-0001jW-Ea for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2016 23:24:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8g9C-0001aL-Ad for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2016 23:24:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49411) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8g9C-0001aG-68 for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2016 23:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c8g9C-0002fY-1C for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2016 23:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2016 04:24:01 +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: Original-Received: via spool by 24966-submit@debbugs.gnu.org id=B24966.147970221610223 (code B ref 24966); Mon, 21 Nov 2016 04:24:01 +0000 Original-Received: (at 24966) by debbugs.gnu.org; 21 Nov 2016 04:23:36 +0000 Original-Received: from localhost ([127.0.0.1]:36577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8g8m-0002ek-Bi for submit@debbugs.gnu.org; Sun, 20 Nov 2016 23:23:36 -0500 Original-Received: from mail-io0-f176.google.com ([209.85.223.176]:35733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8g8k-0002eN-ST; Sun, 20 Nov 2016 23:23:35 -0500 Original-Received: by mail-io0-f176.google.com with SMTP id n13so30591488ioe.2; Sun, 20 Nov 2016 20:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=5cqR65E6h35csSuCgvc2q7AEE1s/Xb8DcctlG1hoDoM=; b=BoPCW+G1F4c8+IOsLAAFw+/Nb+9Rjfm6lN0qYNHGha32aG6du8eut2QoeWnDN+K42A 0KKgYY34PkVCxEy+ED5FRlTJ3ciKFQW//gNu4ZM7cOi62I1NIfdgYcIWFCWiZMTk3k4y P7zyGWN33QqDj3urdMWS7MKpPclPS5hj+0DcaooQT1eI2T72kWgLKrY5A0f/gD1jE8vG ty1PCUzD3IhV5veOFbD/DsqX44i/kqTKILvKEwrzB7RcQHQkfOUubQkOv4Kti/UzpZT/ tN+FPVyTr0w+ov8Vw+6812lEdGrgKNPBzJz2C5Hu48dng/2/E2J5z2vG16M43s+iIr9R sF1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=5cqR65E6h35csSuCgvc2q7AEE1s/Xb8DcctlG1hoDoM=; b=KLq1XAW3F4ZA0VEGjFwvnvu9hos//SnFzbOyn3t30Xm2yr1O9MHwahfpejYuhoqF4u jV5f73d1oXRvJKDPZtokLJNkDgvUKuqfBFl+sR3D/JH5CA4YYivkfAVdN+FIWGr+tr39 587LxsOqnXD8nWS5VDM7dLDEcgtu37eBw/9N0hJlH8e4QPZ9EmBS9HL5/YpVJFEQwzh0 uSRsHK8DouB+tZNr2pe/uldFK4fcxtIR+TeIaSGD9BbCxcdOfQiMt8IBjpN8p3ePVaQq FQIsfIORYDYdaCv9lmoMX0yCuD/BttTJZ8p9RDy46wdsgft0mzNfjhbUaSHOHQvzGiwu Qw2Q== X-Gm-Message-State: AKaTC035Er3AarucpdkkqO+3/+K+20s9JDtLYAmsc0xnzPTcOC/juwyN7EjGSeU1cU/18Q== X-Received: by 10.107.190.6 with SMTP id o6mr9371412iof.95.1479702209103; Sun, 20 Nov 2016 20:23:29 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id x190sm5479557ite.14.2016.11.20.20.23.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Nov 2016 20:23:27 -0800 (PST) In-Reply-To: <87shqnpxym.fsf@udel.edu> (Mark Oteiza's message of "Sat, 19 Nov 2016 05:26:25 -0500") 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:125935 Archived-At: 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 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) "@;\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) "@;\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);