From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#31311: 27.0; doc of `pcase' Date: Mon, 30 Apr 2018 02:29:25 +0200 Message-ID: <87vac9k04a.fsf@web.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525048087 21928 195.159.176.226 (30 Apr 2018 00:28:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Apr 2018 00:28:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31311@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 30 02:28:02 2018 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 1fCwfi-0005Zm-9c for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Apr 2018 02:28:02 +0200 Original-Received: from localhost ([::1]:57343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCwhp-0002gp-2I for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2018 20:30:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCwhj-0002gS-9V for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 20:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCwhe-00018E-CE for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 20:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCwhe-00017u-9Z for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 20:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCwhe-0005mf-0o for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 20:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Apr 2018 00:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31311 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31311-submit@debbugs.gnu.org id=B31311.152504817822181 (code B ref 31311); Mon, 30 Apr 2018 00:30:01 +0000 Original-Received: (at 31311) by debbugs.gnu.org; 30 Apr 2018 00:29:38 +0000 Original-Received: from localhost ([127.0.0.1]:43286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCwhG-0005lg-DI for submit@debbugs.gnu.org; Sun, 29 Apr 2018 20:29:38 -0400 Original-Received: from mout.web.de ([212.227.15.3]:60103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCwhE-0005lR-Sb for 31311@debbugs.gnu.org; Sun, 29 Apr 2018 20:29:37 -0400 Original-Received: from drachen.dragon ([94.217.119.40]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LqUKH-1eiZpH1p7R-00e5NT; Mon, 30 Apr 2018 02:29:26 +0200 In-Reply-To: (Drew Adams's message of "Sun, 29 Apr 2018 09:03:32 -0700 (PDT)") X-Provags-ID: V03:K1:38aVK3NEqSyIxuu0jgDz9ewVHliZ4KjABycPXW59WjOMO0JsJfz 4pm9HCjA+Wf74aAghdzffV3BsLgpcRjdk7XN5c58GWZhgk0AyJCR8Yg6TdXvosCz9ou2/1h VQNR8bm6LlJ3qlxev5fXOMKdgg5RAP3U58oBGxD47J5YZHQwJmX9R7uMc3WNfiLAmWspWme 63EygVXmF0w0xWk1OzJxQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:rzfIKhF/lV4=:7A1Heiw7xLA41ZPVXLikQo ZrqBe6ncLdQbP/t4U9BCqCkK3lObnXpi0cWskSgQgm/XpkplvhwFkEGqRKVuycqPWb+bJXQ6G RDV6M12y3ncXL/P1VcVIyNOaCvLKVJH/5f8hdRiRyv5WknM1cKRjVWHC8TvJqUKCOY1YKXn58 +ZHPGlEDZ6hBP200hVPY/G51/b8zU6MmRsF+yS54G9NrsQv7lSO7V9W0aEyX8fgcoMV/xGfxZ wPyI/c4Oy2eQcwInw63dHHfmJVlTrTa4yU3jNTPSL28/37j71JXfiPR7w+r9MuEzbGFT5KwUw +uJkJnfwRTfLcnJRqKXtHnLM2yN6yCxamvwP6yW4QhsDFdYSMlGHXh+GUOGx2i7h+5JlHPmns Tswm7oStdvRe5IWzOPhp2zSs+u4eX4kPbyJNAF2siTCCXocoBx9Mm5iIc3/Ls1TqkLI1TNUOa pu5zj17eVhoCLa7ZSKuns7xAGWUrR2oRAVCmirh3VMf9ozL5rDn8sGgVjCqtN4WJzW9qoEB02 DXam+qIm1r/+RZShqiyx0i5+7Auvh6gf0Wix1vsSJmszfKb49wmmNjCQ0canSf1ue8voSHd18 yfLX9cEcUChaXXz+lL8ek+JvbzxqKcipNoIAdPkR7mThLpca/WiHqRAOPVZdtLVVKgGZoeb+c BdH6vVjZmaZlx2hBXJgjX2y/CUxjlibmKYZGUdH2X1B+JSSF7JdOt7xRDwlnwHe8//3nI0/V+ 8I8VgDrbklbT2eDFDU/xEgQPhVGDji4BkcdVrpCzuLZywY2X7+OgwivOFReTyLCXoG17Tk9N 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:145848 Archived-At: Hi Drew, I've read the docstring again. There are indeed many things left unclear. I think a prior version already had been clearer, though, much also more brief. > 2. Don't use ATOM unless you mean any atom, even if you explain > subsequently that you really mean a self-evaluating atom. The best part of the doc string is the "complete list of patterns". What is says is right: "ATOM can be a keyword, an integer, or a string". In particular, floats are excluded. nil and t are also excluded. "KEYWORD-OR-INTEGER-OR-STRING" is not a good name, however. > 3. The doc string (but not the Elisp manual, node `Pattern matching case > statement') refers to "the object" without ever specifying what it > is. This makes all of the specifications that use "the object" > meaningless: 'VAL, (pred FUN), and (app FUN PAT). > > The manual uses "the value being matched" instead, which is OK > (understandable). Yes, that's what I would prefer. > Still, it would be clearer to give a name to "the value being > matched" at the beginning: EXPVAL, for example, at the place where > you say, "based on the value of EXPRESSION". That's not necessarily true, however. For example, in (pcase .9 ((let (pred integerp) 1) t)) (which evals to t) "(pred integerp)" is matched against 1, not the original expression (which is ignored by the pattern in this case). > 5. Don't use "QPattern" and "UPattern". Use "Q pattern" and "U > pattern", or (probably better) "Q-pattern" and "U-pattern". I would rather like to get rid from these old names completely. > 6. This part of the description of `guard' is unclear, to me: > > For example ... and let-binds the variable 'x' to that number. > > I see nothing in the descriptions of `guard' and `and' that indicates > why `x' would be let-bound in this example. It's just the SYMBOL case: "SYMBOL matches anything and binds it to SYMBOL." And "(and PAT...) matches if all the patterns match." Michael.