[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] ox-latex.el: fix blank lines behavior in verse block
From: |
Ihor Radchenko |
Subject: |
Re: [patch] ox-latex.el: fix blank lines behavior in verse block |
Date: |
Sun, 13 Aug 2023 08:06:27 +0000 |
Juan Manuel Macías <maciaschain@posteo.net> writes:
>>> + (concat "\\("
>>> + (regexp-quote org-latex-line-break-safe)
>>> + "\n\\)"
>>> + "\\(^[ \t]*"
>>> + (regexp-quote org-latex-line-break-safe)
>>> + "\n"
>>> + "\\)+")
>>> + (concat "^[ \t]*" (regexp-quote org-latex-line-break-safe)
>>> "$"))
>>
>> May also use rx for better readability.
>
> I remember that I tried rx a while ago and found it very useful and
> comfortable, but then I haven't done anything with it. The fact is that
> over time I have ended up getting used to suffering from the classic
> regexp and it is hard for me to get out of there :-). Of course, with rx
> it would be clearer but I would have to refresh my memory.
You can refer to [[info:elisp#Rx Constructs][elisp#Rx Constructs]]
I think your regexp in rx should look like
(rx-to-string `(seq (group ,org-latex-line-break-safe "\n")
(1+ (group line-start (0+ space) ,org-latex-line-break
"\n"))))
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, (continued)
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/07
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/07
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/09
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/09
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/10
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/10
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/11
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/11
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/12
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/12
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block,
Ihor Radchenko <=
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/14
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/15
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/15
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/15
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/15
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/16
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/16
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/17
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Juan Manuel Macías, 2023/08/17
- Re: [patch] ox-latex.el: fix blank lines behavior in verse block, Ihor Radchenko, 2023/08/18