[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Run `fill-paragraph' on all the paragraphs in the currently opened L
From: |
Emanuel Berg |
Subject: |
Re: Run `fill-paragraph' on all the paragraphs in the currently opened LaTeX document. |
Date: |
Sun, 17 Oct 2021 14:42:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hongyi Zhao wrote:
> How to select/mark/narrow-to all the lines that don't start
> with `\'?
I don't know if Emacs has its own way already to do this, but
in general ...
You could iterate the whole buffer line-by-line, and check
each line if it starts with '\' or not, e.g. with (looking-at
"\\\\"). When you find one "beg", start looking for where it
ends, and when you find that push (beg end) onto a list.
Then loop thru the list and do (fill-region beg end) for each
list pair item ...
PS. That sounds like fun, please post the code here :)
--
underground experts united
https://dataswamp.org/~incal
Re: Run `fill-paragraph' on all the paragraphs in the currently opened LaTeX document., Yuri Khan, 2021/10/17
Re: Run `fill-paragraph' on all the paragraphs in the currently opened LaTeX document., Hongyi Zhao, 2021/10/17
Re: Run `fill-paragraph' on all the paragraphs in the currently opened LaTeX document., Hongyi Zhao, 2021/10/18