From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#20642: 24.5; Please improve documentation for `pcase' Date: Sun, 24 May 2015 12:34:06 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1432463724 23082 80.91.229.3 (24 May 2015 10:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 May 2015 10:35:24 +0000 (UTC) To: 20642@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 24 12:35:12 2015 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 1YwTFP-0002ht-Sp for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 May 2015 12:35:12 +0200 Original-Received: from localhost ([::1]:39663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTFP-0004FK-4o for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 May 2015 06:35:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTFK-0004Ch-JS for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwTFH-0003xJ-Cr for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:35:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTFH-0003wz-7u for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YwTFG-0000bU-T8 for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 May 2015 10:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20642 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14324636732253 (code B ref -1); Sun, 24 May 2015 10:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2015 10:34:33 +0000 Original-Received: from localhost ([127.0.0.1]:54276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwTEi-0000a7-UP for submit@debbugs.gnu.org; Sun, 24 May 2015 06:34:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42619) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwTEc-0000ZZ-Cx for submit@debbugs.gnu.org; Sun, 24 May 2015 06:34:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwTEW-0003YS-1d for submit@debbugs.gnu.org; Sun, 24 May 2015 06:34:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTEV-0003YO-Ve for submit@debbugs.gnu.org; Sun, 24 May 2015 06:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTEU-00048N-Hz for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:34:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwTEO-0003XZ-Nb for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:34:14 -0400 Original-Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:36224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwTEO-0003XV-D5 for bug-gnu-emacs@gnu.org; Sun, 24 May 2015 06:34:08 -0400 Original-Received: by wgbgq6 with SMTP id gq6so51796341wgb.3 for ; Sun, 24 May 2015 03:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=JEIB2h+wQrqaZ1E/eIolDod/xsP7/TyfyQDVmruiyOY=; b=FqM55034b+3SPS0HJ2AwW2LjPaYpENltk/4mUBYW5Pbyj0Y1vGb+bV4aKNzkQYHXLJ dEOscGxhpp6JxLHXMyyy8eNIDPxnenxeprnvRVwxgrJoWLsRek4ZOY+V2rLpfp3vsgZW +dsiS+6cl/zm2Wc186HfY4xx6+BsEUFy8sgbh+ugWbOwaqpghQ8+Y5ROgtRjOSrX4oiQ pnwffR10257iWtAXDa8Ugej/NxWjBQPV2UE7BsU8BJf/i1vBr9v9Y62dnhT7h1IeUGAy vvmYP9bv2xI1bR1L125CHieRgbMAbPliLCEYZwJOf6cqQy9+A90NkJPACCCcZ83P4CMz Tfng== X-Received: by 10.194.87.1 with SMTP id t1mr31318716wjz.24.1432463647813; Sun, 24 May 2015 03:34:07 -0700 (PDT) Original-Received: from p (46.128.209.83.dynamic.cablesurf.de. [46.128.209.83]) by mx.google.com with ESMTPSA id bo5sm6691271wjc.43.2015.05.24.03.34.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 May 2015 03:34:07 -0700 (PDT) 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-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:103135 Archived-At: Quoting the documentation of `pcase', some comments inline. Perform ML-style pattern matching on EXP. Users are probably not aware what 'ML-style pattern matching' is. Please add an introduction without referring to ML. CASES is a list of elements of the form (UPATTERN CODE...). Please document the motivation for the existence and nomenclature or UPatterns and QPatterns. UPatterns can take the following forms: _ matches anything. SELFQUOTING matches itself. This includes keywords, numbers, and strings. Please add exhaustive information about all the cases covered by the SELFQUOTING form. What kinds of forms does it comprise? There is overlap with the SYMBOL case below, which has very different semantics, so the distinction should be made as clear as possible. Please include information about the very common symbols nil and t. SYMBOL matches anything and binds it to SYMBOL. Please state explicitly in which cases this form applies. Given that _ and :foo are also symbols, it is clear that it doesn't apply to all symbols. Something like "all symbols except _, keywords, nil or t"? (or UPAT...) matches if any of the patterns matches. (and UPAT...) matches if all the patterns match. In the `and' form, please give and example for the following very common but non-obvious form: (and UPAT SYMBOL) e.g. (and (pred integerp) myvar), meaning to bind to a symbol only if some guard expression matches. In GNU Emacs 24.5.1 (x86_64-apple-darwin14.1.0, NS apple-appkit-1344.72) of 2015-04-12 on p Configured using: `configure --prefix=/usr/local/Cellar/emacs/24.5 --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/24.5/share/info/emacs --with-file-notification=gfile --with-dbus --with-gnutls --with-rsvg --with-imagemagick --without-popmail --with-ns --disable-ns-self-contained' Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Mark set Sending... Mark set [2 times] Sending via mail... Sending email Sending email done gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated. Sending...done Load-path shadows: None found. Features: (eieio-opt speedbar sb-image ezimage dframe find-func gnutls network-stream starttls tls mailalias smtpmail auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core password-cache cus-edit cus-start cus-load wid-edit cl-loaddefs cl-lib help-mode pp shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils warnings help-fns files-x xterm time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify cocoa ns multi-tty emacs) Memory information: ((conses 16 118129 9719) (symbols 48 21487 0) (miscs 40 54 289) (strings 32 20379 5134) (string-bytes 1 568058) (vectors 16 11343) (vector-slots 8 377405 5190) (floats 8 77 427) (intervals 56 665 100) (buffers 960 19))