From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Clarify `pcase' `rx' pattern doc Date: Wed, 13 Jun 2018 19:29:29 +0700 Message-ID: References: <87fu1rqr6m.fsf@web.de> <87a7rzqm11.fsf@web.de> <871sdbqfq2.fsf@web.de> <87vaanp09v.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1528892865 24868 195.159.176.226 (13 Jun 2018 12:27:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2018 12:27:45 +0000 (UTC) Cc: phst@google.com, Andreas Schwab , Emacs developers To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 13 14:27:41 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fT4sG-0006NS-OX for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2018 14:27:40 +0200 Original-Received: from localhost ([::1]:33798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT4uN-0002kq-U8 for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2018 08:29:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT4uH-0002fr-GF for emacs-devel@gnu.org; Wed, 13 Jun 2018 08:29:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fT4uF-0005Sr-DL for emacs-devel@gnu.org; Wed, 13 Jun 2018 08:29:45 -0400 Original-Received: from mail-ot0-x22c.google.com ([2607:f8b0:4003:c0f::22c]:44485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fT4uF-0005QR-1o for emacs-devel@gnu.org; Wed, 13 Jun 2018 08:29:43 -0400 Original-Received: by mail-ot0-x22c.google.com with SMTP id w13-v6so2709795ote.11 for ; Wed, 13 Jun 2018 05:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+Tg9OpxdvnK5TefOt2BDbjp44I/z4tIk4R31dT7g+58=; b=NApUO3r4vjlbweFVi014ZfMKgdnrXYUsDZO2XC46QV5m+I70Ov0oDCtvkqeg1j3+YX aOb9hId47ba4LOwlT2pxAuJE0DDXTgnOREFmcYyULIOJ1fStXaeEaeoqTxyx9YhXv+ED ccn4LXwBH9lg+j9l/5KsxUfUZh+1mZFKF42cLlMVDMd+a7fyZ1jhblAf8uT1TuQidOOS wRxKcKDMo4YA7tgy2+lLhpgCyxhYUjHSMuISlZig2TTsWnL1y/3Hl9DiezsEKrK6elKU hGYfzV+TlbjiUSuSoutEUYyhGiFmpXyvIsugpT9FgHPxxPdzj4KgiLApO5B5WTVg+ZBM +qnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+Tg9OpxdvnK5TefOt2BDbjp44I/z4tIk4R31dT7g+58=; b=WOQ527A+m88nwsi/nlfC2mJSnCWakj4R3sQKEttYL9jrQ44Vi3nvPOIPEQe0lZ5rJR Rn7r0NxhvneFIs0CF4WaP0WoRg+7PUG+f6VRaUGmIkHb2RKgAeIoO2+tHaEEiURji6aX CFeFuigNLG9ztljGdqiyORfVh0hkwBrEeLQ7kj5f8wi76AtSoO11DrvmDi/dYi/5zwG9 B9zUarC0wuQ3DM4VQkwtws0gBaMLjRh6BhLdixQT+qgGBe2J1Is0JhRIBUvDl1eOqq/3 iZNwzGvRfwyNian5fhX9n12NkpBhRbXZ3Gh9OLb+H3KUD9xTrfHN40rMRAw/jgGB+e/F lMZA== X-Gm-Message-State: APt69E2c1zhPc1z7kRcif2GJ3T2tLivUMVnMsN4hooJw1Ms3Ks3+P9gK 4tpZvvql69qhPtkMHTTNSo9pje9RFPyXGpRvTuQ= X-Google-Smtp-Source: ADUXVKI/MsNWNQYpm0N2DYggoIWgDUibGgR2asqGKnWbPTPTH801rsvjCrldFQ3J5m1U6MxW6f4Bnk+sgJ/8wNp+L94= X-Received: by 2002:a9d:2d52:: with SMTP id v76-v6mr3155912ota.381.1528892982241; Wed, 13 Jun 2018 05:29:42 -0700 (PDT) In-Reply-To: <87vaanp09v.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226286 Archived-At: On Wed, Jun 13, 2018 at 3:22 PM Michael Heerdegen wrote: > BTW this aspect concerns more or less all pcase pattern definitions: The > first sentence either is not a sentence in the strict sense, or says > "Build a pcase pattern matching..." We should probably unify the > language used. The standard patterns are documented in this form: matches . It would be nice if extended patterns defined using pcase-defmacro also followed this syntax: -- (seq &rest PATTERNS) Matches a SEQUENCE such that each element of PATTERNS matches a corresponding element of SEQUENCE. Extra elements of the sequence are ignored if fewer PATTERNS are given, and the match does not fail. In other words, for the user, it is not important that underlying the =E2=80=98(seq =E2=80=A6)=E2=80=99 is a =E2=80=98seq--pcase-macroexpander=E2= =80=99 function that builds a pcase pattern out of simpler constructs. From the user=E2=80=99s viewpoint, =E2= =80=98(seq =E2=80=A6)=E2=80=99 *is* the pattern.