[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 12:06:54 +0800 |
On Sat, Jul 31, 2021 at 9:34 AM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> 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)")
I failed to expand the above lisp code snippet with macrostep [1]:
`M-x macrostep-expand RET':
macrostep-sexp-bounds: (xr ...) is not a macro form
Further, I tried with `C-h o ^xr$', and nothing is matched.
> ==>
> (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 ;-)
>
>
> Michael.
[1] https://github.com/joddie/macrostep
Regards
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
- Re: [External] : Re: Package cl is deprecated, (continued)
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/30
- RE: [External] : Re: Package cl is deprecated, Drew Adams, 2021/07/30
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/30
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/30
- RE: [External] : Re: Package cl is deprecated, Drew Adams, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Michael Heerdegen, 2021/07/31
- RE: [External] : Re: Package cl is deprecated, Drew Adams, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Michael Heerdegen, 2021/07/30
- Re: [External] : Re: Package cl is deprecated,
Hongyi Zhao <=
- Re: [External] : Re: Package cl is deprecated, Michael Heerdegen, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/31
- RE: [External] : Re: Package cl is deprecated, Drew Adams, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/31
- RE: [External] : Re: Package cl is deprecated, Drew Adams, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Emanuel Berg, 2021/07/31
- Re: [External] : Re: Package cl is deprecated, Hongyi Zhao, 2021/07/30
- RE: [External] : Re: Package cl is deprecated, Drew Adams, 2021/07/31