From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#14935: 24.3.50; pcase (or) UPAT fails? Date: Tue, 23 Jul 2013 23:00:16 +0200 Organization: EUR Message-ID: <87ehapf0v3.fsf@gmail.com> References: <87ip01fr90.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374613304 18633 80.91.229.3 (23 Jul 2013 21:01:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2013 21:01:44 +0000 (UTC) To: 14935@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 23 23:01:42 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V1jiF-00037P-KI for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 23:01:39 +0200 Original-Received: from localhost ([::1]:33608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1jiF-0002Mp-AM for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 17:01:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1jhi-0001fw-JJ for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 17:01:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1jhf-0008ET-Sw for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 17:01:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1jhf-0008EK-QJ for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 17:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V1jhe-0004IN-T6 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 17:01:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2013 21:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14935 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14935-submit@debbugs.gnu.org id=B14935.137461322916459 (code B ref 14935); Tue, 23 Jul 2013 21:01:02 +0000 Original-Received: (at 14935) by debbugs.gnu.org; 23 Jul 2013 21:00:29 +0000 Original-Received: from localhost ([127.0.0.1]:45440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1jh6-0004HM-A4 for submit@debbugs.gnu.org; Tue, 23 Jul 2013 17:00:28 -0400 Original-Received: from mail-ea0-f177.google.com ([209.85.215.177]:53836) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1jh2-0004H0-B9 for 14935@debbugs.gnu.org; Tue, 23 Jul 2013 17:00:25 -0400 Original-Received: by mail-ea0-f177.google.com with SMTP id j14so4707515eak.36 for <14935@debbugs.gnu.org>; Tue, 23 Jul 2013 14:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=maHZZ9pn47k2/RI9352YJNBDCd0Vp5TqKUwRCXn6rTo=; b=ryCy1LqGq97ltf5m/1/oXXJbJHW+apcvLJYYnwnkkzUx0YqhV+Zh9loPziZpJ61eRz +p+TCdEjjHHyTS5OJPJXm3Y6euSynxyKBI5BuaQfUs0oB5pqcVqL+Cru46FVzeRrU2Xl A32KQwnpqtservdsfHdgoeXC3Sc+wwmfR93B8aERQxyjSmb5MlGJeOGW8Kg8iADQBSec wbHqN64LyYDkkxDwbfZ7kIIS9ZV3rbai5oDA6J/ZkzHrZ1kVaObPGStaTDByr9sY0mS8 YdV2UrCLK0WD3nkuHozCLNGlKaw9fW2ou1ZSyh9qsFed7RegqodbPhXLJCbn0CGxDjRD 4zpg== X-Received: by 10.15.93.134 with SMTP id w6mr34634494eez.25.1374613218330; Tue, 23 Jul 2013 14:00:18 -0700 (PDT) Original-Received: from localhost (dhcp-077-249-018-128.chello.nl. [77.249.18.128]) by mx.google.com with ESMTPSA id a4sm61266492eez.0.2013.07.23.14.00.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 23 Jul 2013 14:00:17 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 23 Jul 2013 09:44:49 -0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76609 Archived-At: Thanks Andreas and Stephen, I actually tried unquoting with comma before reporting. But it never occurred to me that strings should be backticked. Strings are selfquoted and, in my understanding, the following should have worked: (pcase "^" ((or "^" "%") (message "here"))) The documentation says that strings are UPATs so (pcase "^" ("^" (message "here"))) works. Then docs also say that (or UPAT UPAT) is also an UPAT so (or "^" "%") should also work. Do I miss anything? Thanks, Vitalie >> Stefan Monnier >> on Tue, 23 Jul 2013 09:44:49 -0400 wrote: >> This doesn't: >> (pcase (list 23 nil "%") >> (`(,scale nil (or "^" "%")) (message "%s" scale)) >> (_ (message "failed"))) >> Is this a bug? > No, it's normal. The third pattern matches a list of 3 elements (the > first being the symbol `or'). You probably meant to do > (pcase (list 23 nil "%") > (`(,scale nil ,(or `"^" `"%")) (message "%s" scale)) > (_ (message "failed"))) > -- Stefan