From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: Package cl is deprecated Date: Sat, 31 Jul 2021 13:26:07 +0800 Message-ID: References: <874kceadmj.fsf@t14.reltub.ca> <83fsvytude.fsf@gnu.org> <87r1fi8qor.fsf@t14.reltub.ca> <83y29qs31w.fsf@gnu.org> <87fsvv2rn0.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38899"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 31 07:27:02 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9hWX-0009zd-Ub for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Jul 2021 07:27:01 +0200 Original-Received: from localhost ([::1]:41052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9hWV-0002jZ-Sa for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Jul 2021 01:26:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9hVu-0002jK-Lo for help-gnu-emacs@gnu.org; Sat, 31 Jul 2021 01:26:22 -0400 Original-Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]:40820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m9hVt-00014J-7F for help-gnu-emacs@gnu.org; Sat, 31 Jul 2021 01:26:22 -0400 Original-Received: by mail-lj1-x232.google.com with SMTP id m9so15518242ljp.7 for ; Fri, 30 Jul 2021 22:26:20 -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=B/xz6l1BuAlonCmUNfFSn+NTB/IHCkxfkQTc5Pn/59Y=; b=DoifGlYBszdEHK8MMNa9sZz2K/VRB8/STrM4K6S4r+AFOr1KLkXSMCi6fb9A0FjdwX XwzoOPSjp7Wf7cRE68BSWoTJ/AJ3jRNu+iaClcEJIo3CdMRY3AdJ+xMo0baOpz08ZW/y uilHGViu59tjGW+BpJMNyIg+kS/dO4ShdSnl4ZtmZT5xhICSysedjzfP5DTXjOvgy1uP 4vE7kEYOzEFKG1p5vPMtTrJUs1lFEnH8o8o3r50ZNMxhQQeNv2yPBU5JOT1aSij7Z6mt khgYs4ZMiJOlT1EOPKiKH++WpNd7Cj6LWf43MzSW/7VvgPjS19gME2PWefePUm3eLptx eLEg== 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=B/xz6l1BuAlonCmUNfFSn+NTB/IHCkxfkQTc5Pn/59Y=; b=Gdi7yeZSTLZK9cVs8rOA1YreZZCDrG3c3ZKA5PFllWVL4Rb8xj8OMnDnkh95JiuTfe +QhJwxJ+Ufq4AX6mq4vlLx4cgHW4Weqokaah//ZWC96UuauXMZy8Re4V8Ykh3832gPEU b9ufIugkA5W115oLLwY8Eopg4pHd+HQNsO6bmkionwU+P+vk5/zzRq6Vfm1nPKREVRKh pXNQYsyivbh1sVlW1nybKEXPB3Q710DLG9y36rwevN6uOif7yCvRGD8hvptt5GCMWC49 yygNsgwA57Ie1Z3l6mK6yBa1PcoPgUFljqpw/151qCiNcEGjp7EiH2azoOD+25tA/FfE aWMQ== X-Gm-Message-State: AOAM530RXuyy0fqDm8xDDxOC8pMMm3P/O5t0UFo1WzdPIM+WXg5FZqcZ oNA4Fee55LRGPByP6FRivQZfLP/B/o8NB5kfQ5A= X-Google-Smtp-Source: ABdhPJz/tvOow4BP5OZ774/jAXBq9u2dgILskJlZeHIVnhoiEp6cJWsR/ErRRscatz1T/l3mn8KEAOnFmV9zacmBxUQ= X-Received: by 2002:a05:651c:12c4:: with SMTP id 4mr3989156lje.320.1627709179070; Fri, 30 Jul 2021 22:26:19 -0700 (PDT) In-Reply-To: <87fsvv2rn0.fsf@web.de> Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=hongyi.zhao@gmail.com; helo=mail-lj1-x232.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132209 Archived-At: On Sat, Jul 31, 2021 at 9:34 AM Michael Heerdegen wrote: > > Hongyi Zhao writes: > > > > (require[ > > > ]+[.][ > > > ]+cl) > > > > Thank you for showing me this pattern. TBF, it seems to me that the > > syntax of line spanning match pattern is very strange. It would be > > nice if there were some explanation for how to build this pattern. > > I suggest to use "xr" which is the reverse of `rx' which is a thing that > allows to construct regular expressions from a simple and well > documented symbolic description language (see doc of `rx'). So > > (xr "(require[ > ]+[.][ > ]+cl)") > > =3D=3D> > (seq "(require" > (one-or-more (any "\n ")) > "." > (one-or-more (any "\n ")) > "cl)") > > As mentioned, see the help of `rx' to see what any part means, though > it's already quite readable. > > Note that for regexp searching there is no Lisp interpreter involved > that would read your input string. What you type is used directly, > which means that \n does not match a newline (but instead the character > "n"). That's why the search pattern includes real newlines. This is > bit confusing at the beginning, anyway, that's already all, you can do > it ;-) For someone who knows it for the first time, like me, it=E2=80=99s really strange. Anyway, thank you and all the others here for letting me know so many treasures related to the Emacs ecosystem. Regards, Hongyi