From unknown Thu Jun 19 14:03:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18288 <18288@debbugs.gnu.org> To: bug#18288 <18288@debbugs.gnu.org> Subject: Status: pcase documentation rewrite Reply-To: bug#18288 <18288@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:03:20 +0000 retitle 18288 pcase documentation rewrite reassign 18288 emacs submitter 18288 Mario Valencia severity 18288 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 01:48:17 2014 Received: (at submit) by debbugs.gnu.org; 18 Aug 2014 05:48:17 +0000 Received: from localhost ([127.0.0.1]:45899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XJFnk-0003XA-JX for submit@debbugs.gnu.org; Mon, 18 Aug 2014 01:48:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58929) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XJFnh-0003Wo-NU for submit@debbugs.gnu.org; Mon, 18 Aug 2014 01:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJFnb-0003iO-OT for submit@debbugs.gnu.org; Mon, 18 Aug 2014 01:48:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJFnb-0003iJ-Lo for submit@debbugs.gnu.org; Mon, 18 Aug 2014 01:48:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJFna-0005w6-Oz for bug-gnu-emacs@gnu.org; Mon, 18 Aug 2014 01:48:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJFna-0003hq-15 for bug-gnu-emacs@gnu.org; Mon, 18 Aug 2014 01:48:06 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:49930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJFnZ-0003hQ-QK for bug-gnu-emacs@gnu.org; Mon, 18 Aug 2014 01:48:05 -0400 Received: by mail-wi0-f177.google.com with SMTP id ho1so3087302wib.4 for ; Sun, 17 Aug 2014 22:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=w+BaVfb9CMZadwu9j0j6fFueLTYgDxal9CdT3P9J0pk=; b=CPRgCmeGPs605/5TZ7r9y7QFLvXsNknqIzPp1GRselb1QZQy3Nj3FKyr5Ox8TsI/jp Tz9ciPC72GYMUqtuC96uWsiKsOpeNld4bP489yZJCaFAYBM+KluQ9JnHb4gPib5g4wf7 vXhJ+Mqk2+ea91OR/wzVSSB/FxTcI+gLxgJRo4UFYbq3j8KjL307sKpiYAlHy1iUpIue U0fZ1JROQ0GBYMEvKxOrbHHP1vqM2o0oUTuCn6HsI0ee5ZUBgogsOOzwXvjhPcVuYomN V0LxybfjQn8r21ahtA45A4wgb8KSrfYKlvq8YWB5CojaPgOknN0slxePiV9NCNIbJVN+ Iiag== MIME-Version: 1.0 X-Received: by 10.194.118.232 with SMTP id kp8mr39470584wjb.42.1408340883841; Sun, 17 Aug 2014 22:48:03 -0700 (PDT) Received: by 10.194.38.35 with HTTP; Sun, 17 Aug 2014 22:48:03 -0700 (PDT) Date: Mon, 18 Aug 2014 00:48:03 -0500 Message-ID: Subject: pcase documentation rewrite From: Mario Valencia To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e0115f7061aa8990500e0eade X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0115f7061aa8990500e0eade Content-Type: text/plain; charset=UTF-8 The documentation in '(elisp) Pattern matching case statement' is very difficult to understand. Could somebody please rewrite it so mere mortals can read it? thnx --089e0115f7061aa8990500e0eade Content-Type: text/html; charset=UTF-8
The documentation in '(elisp) Pattern matching case statement' is very difficult to understand. Could somebody please rewrite it so mere mortals can read it? thnx
--089e0115f7061aa8990500e0eade-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 04:12:57 2014 Received: (at 18288) by debbugs.gnu.org; 18 Aug 2014 08:12:57 +0000 Received: from localhost ([127.0.0.1]:45931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XJI3k-0007wf-QU for submit@debbugs.gnu.org; Mon, 18 Aug 2014 04:12:57 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:51011) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XJI3i-0007wW-GG for 18288@debbugs.gnu.org; Mon, 18 Aug 2014 04:12:55 -0400 Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id A44773D6009; Mon, 18 Aug 2014 10:12:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wq3gRxDg-K5C; Mon, 18 Aug 2014 10:12:52 +0200 (CEST) X-CHKRCPT: Envelopesender noch tsdh@gnu.org Received: from thinkpad-t440p.tsdh.org (dhcp131.uni-koblenz.de [141.26.71.131]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 623EE3D6004; Mon, 18 Aug 2014 10:12:52 +0200 (CEST) From: Tassilo Horn To: Mario Valencia Subject: Re: bug#18288: pcase documentation rewrite References: Date: Mon, 18 Aug 2014 10:12:50 +0200 In-Reply-To: (Mario Valencia's message of "Mon, 18 Aug 2014 00:48:03 -0500") Message-ID: <87lhqmcj25.fsf@thinkpad-t440p.tsdh.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18288 Cc: 18288@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Mario Valencia writes: Hi Mario, > The documentation in '(elisp) Pattern matching case statement' is very > difficult to understand. Could somebody please rewrite it so mere > mortals can read it? Could you be a bit more specific? What exactly is difficult to understand? What further questions do you still have after reading the docs? Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 23 11:04:15 2014 Received: (at submit) by debbugs.gnu.org; 23 Aug 2014 15:04:15 +0000 Received: from localhost ([127.0.0.1]:50270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLCrW-00006V-Vj for submit@debbugs.gnu.org; Sat, 23 Aug 2014 11:04:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37519) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLCrU-00006A-Vj for submit@debbugs.gnu.org; Sat, 23 Aug 2014 11:04:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLCrI-0005FI-Tl for submit@debbugs.gnu.org; Sat, 23 Aug 2014 11:04:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLCrI-0005FE-RE for submit@debbugs.gnu.org; Sat, 23 Aug 2014 11:04:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLCrC-0008Cs-I0 for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2014 11:04:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLCr6-0005Eg-KS for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2014 11:03:54 -0400 Received: from xvm-90.mit.edu ([18.181.2.90]:39188 helo=mod-relay.xvm.mit.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLCr6-0005Ea-Hb for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2014 11:03:48 -0400 Received: by mod-relay.xvm.mit.edu (Postfix) id 2189221190; Sat, 23 Aug 2014 11:03:47 -0400 (EDT) Delivered-To: gnu-emacs-bug@moderators.isc.org Received: from mail.muc.de (colin.muc.de [193.149.48.1]) by mod-relay.xvm.mit.edu (Postfix) with ESMTP id CBB2E1EF42 for ; Sat, 23 Aug 2014 11:03:46 -0400 (EDT) Received: (qmail 14676 invoked by uid 8); 23 Aug 2014 14:57:05 -0000 To: gnu-emacs-bug@moderators.isc.org Path: not-for-mail From: Alan Mackenzie Newsgroups: gnu.emacs.bug Subject: Re: bug#18288: pcase documentation rewrite Date: Sat, 23 Aug 2014 14:57:05 +0000 (UTC) Organization: muc.de e.V. Lines: 87 Message-ID: References: NNTP-Posting-Host: news.muc.de X-Trace: colin.muc.de 1408805825 14674 193.149.48.2 (23 Aug 2014 14:57:05 GMT) X-Complaints-To: news-admin@muc.de NNTP-Posting-Date: Sat, 23 Aug 2014 14:57:05 +0000 (UTC) User-Agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/8.4-RELEASE (amd64)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) [1}Tassilo Horn wrote: >Mario Valencia writes: >Hi Mario, >> The documentation in '(elisp) Pattern matching case statement' is very >> difficult to understand. Could somebody please rewrite it so mere >> mortals can read it? >Could you be a bit more specific? What exactly is difficult to >understand? What further questions do you still have after reading the >docs? OK, I'll bite. I think the OP was quite clear - he was utterly unable to understand the page at all, so asking him for "further questions" is not helpful. After trying to read that info page several times over the last few months, I've still only got a vague idea of how to use pcase, so I have to agree with the OP. Here are some of the things that are wrong: (i) Bug: ".... and then compare the value against _each_ UPATTERN ...." is surely wrong - it will compare the value only against _some_ UPATTERNs, stopping when a match is found. Surely? (ii) "UPATTERN" and "QPATTERN" have no definitions - only the relationship between them is sketched, not what they _are_. This makes is difficult to get a conceptual handle on everything. (iii) In the first example ("(pcase (get-return-code x) ...)") it is entirely unclear why the symbols there are quoted with backquote. Why not just with quote? (iv) It would seem that the reader macros backquote and comma mean something different in the pcase construct from their normal meanings. This desperately needs explicitly stating and emphasising, and early on. What about ",@"? (v) The meaning and rules for the idiosyncratic backquote and comma need to be rigorously and explicitly documented. (vi) Where, if anywhere, inside a pcase construct can standard backquote be used? (vii) "The UPATTERN mentioned above are ..." is a singlular noun with a plural verb. (viii) [In the "definition" of QPATTERN] "The intention is to mimic the backquote macro: this pattern matches those values that COULD HAVE BEEN BUILT BY SUCH A BACKQUOTE EXPRESSION" is very vague. What on earth is "could" supposed to mean here? In what parallel universe might those values have been built? "the backquote macro" could be confusing - there would seem to be (at least) two distinct backquote macros; perhaps the word "standard" should be inserted before "backquote". (ix) [Carrying on from (viii)] "Since we're pattern matching rather than building a value, the unquote does not indicate where to plug an expression, but .....". This is so bad as to be painful to dissect. o - What does "building a value" here mean? o - What's an "unquote"? Throughout the Elisp manual "unquoted" means "not being quoted by '". Is "backquote" meant here? o - What does "plug an expression" (at a place) mean? (x) [Carrying on from (ix)] "... but instead it lets one specifiy a U-pattern that should match the value at that location". Which "location"? What does "location" even mean? What "value"? (xi) It would be really nice if "QPATTERN" were defined. (xii) [First paragraph] "the macro `pcase' can come handy", should be "... can come IN handy". (xiii) Why is the "don't care" symbol "_" rather that t? This should be explained. The entire page is wishy-washy and vague. I think it probably makes good sense to somebody who already knows how pcase works. As I said, I haven't grasped the pcase mechanism enough even to be able to criticize the info page properly. It would seem readers are expected to absorb the details of pcase by osmosis rather than systematic reading. >Bye, >Tassilo -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun May 24 19:18:12 2015 Received: (at control) by debbugs.gnu.org; 24 May 2015 23:18:12 +0000 Received: from localhost ([127.0.0.1]:54980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ywf9j-0001Mh-GH for submit@debbugs.gnu.org; Sun, 24 May 2015 19:18:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39945 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ywf9d-0001M5-Am for control@debbugs.gnu.org; Sun, 24 May 2015 19:18:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Ywf9c-000418-QW for control@debbugs.gnu.org; Sun, 24 May 2015 19:18:00 -0400 Date: Sun, 24 May 2015 19:18:00 -0400 Message-Id: Subject: control message for bug 20642 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) forcemerge 18288 20642 From unknown Thu Jun 19 14:03:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Jul 2015 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator