[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: Package cl is deprecated

From: Hongyi Zhao
Subject: Re: [External] : Re: Package cl is deprecated
Date: Sat, 31 Jul 2021 13:26:07 +0800

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)")
> ==>
>  (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’s really
strange. Anyway, thank you and all the others here for letting me know
so many treasures related to the Emacs ecosystem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]