From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13126: 24.3.50; (WISH) Document pcase in Info manual Date: Thu, 13 Dec 2012 12:37:28 -0500 Message-ID: References: <87fw3fpoa6.fsf@gmail.com> <87txrslwjp.fsf@gmail.com> <87fw3a2dy2.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355427810 16997 80.91.229.3 (13 Dec 2012 19:43:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Dec 2012 19:43:30 +0000 (UTC) Cc: 13126@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 13 20:43:41 2012 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 1TjEgy-0007au-MK for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Dec 2012 20:43:36 +0100 Original-Received: from localhost ([::1]:45093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjEgl-0003vO-SH for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Dec 2012 14:43:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjEgc-0003pu-Ue for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 14:43:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjEgW-0006kT-RI for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 14:43:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjEgW-0006kP-OV for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 14:43:08 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TjEhN-00021t-Vy for bug-gnu-emacs@gnu.org; Thu, 13 Dec 2012 14:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Dec 2012 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13126-submit@debbugs.gnu.org id=B13126.13554277997707 (code B ref 13126); Thu, 13 Dec 2012 19:44:01 +0000 Original-Received: (at 13126) by debbugs.gnu.org; 13 Dec 2012 19:43:19 +0000 Original-Received: from localhost ([127.0.0.1]:41271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjEgg-00020F-Iu for submit@debbugs.gnu.org; Thu, 13 Dec 2012 14:43:19 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:33150) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjEgd-000205-Nj for 13126@debbugs.gnu.org; Thu, 13 Dec 2012 14:43:16 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.DIT.UMontreal.CA (8.14.1/8.14.1) with ESMTP id qBDJgL3m021766; Thu, 13 Dec 2012 14:42:21 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 583BD5942A; Thu, 13 Dec 2012 12:37:28 -0500 (EST) In-Reply-To: <87fw3a2dy2.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 13 Dec 2012 20:31:57 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4431=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4431> : streams <873689> : uri <1293285> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:68479 Archived-At: >>> Thanks. `pcase' seemed a good replacement for `case'. >> While it's not a plug-in replacement, it provides a superset of the >> features of case, yes. > pcase also reminds me of CL's case. Btw, you know in what version of > Emacs did pcase made it's appearance. Probably 24.1. You'd have to check the NEWS file. > Provide a BNF and document TERMINALS before NON-TERMINALS. (Currently it > seems other way round). I don't think a BNF spec has its place there. It's fine for the docstring, but the point of this lispref subsection is to give an introduction to `pcase'. > May be replace the example snippets with a /simple/ and /cohesive/ > example. Do you think snippet 1 is not sufficiently simple? > I found Snippet 2 "too abstract" and leaves a lot to the > imagination of the reader. For those readers not familiar enough with functional programming, I could tweak it, maybe replacing `call' and `fn' cases with `(neg ,x) and `(if ,t ,e1 ,e2)? Would that help? The problem I see with your snippets is that they're too long. Stefan