[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : How to get all paragraphs in list?
From: |
Yuri Khan |
Subject: |
Re: [External] : How to get all paragraphs in list? |
Date: |
Wed, 7 Sep 2022 20:05:32 +0700 |
On Wed, 7 Sept 2022 at 13:06, Jean Louis <bugs@gnu.support> wrote:
> (while (< (point) end)
> (funcall function)
> (forward-paragraph)))))
This loop is fragile: if FUNCTION moves point backward in the buffer,
it may loop infinitely, or if it moves forward, it may skip some
paragraphs. I’d maybe wrap the funcall in a save-excursion.
More to the point[sic], you calculate and cache the END position as an
integer. So if your FUNCTION reduces the length of the buffer text,
you may never reach END. Should probably place a marker there, or
check for (region-end) or (point-max) every time.
- Re: How to get all paragraphs in list?, (continued)
- RE: [External] : How to get all paragraphs in list?, Drew Adams, 2022/09/05
- Re: [External] : How to get all paragraphs in list?, Jean Louis, 2022/09/05
- RE: [External] : How to get all paragraphs in list?, Drew Adams, 2022/09/05
- RE: [External] : How to get all paragraphs in list?, Jean Louis, 2022/09/06
- Re: [External] : How to get all paragraphs in list?, Jean Louis, 2022/09/07
- Re: [External] : How to get all paragraphs in list?,
Yuri Khan <=
- RE: [External] : How to get all paragraphs in list?, Drew Adams, 2022/09/07
- Re: [External] : How to get all paragraphs in list?, Emanuel Berg, 2022/09/16
- Re: [External] : How to get all paragraphs in list?, Yuri Khan, 2022/09/16
- Re: [External] : How to get all paragraphs in list?, Jean Louis, 2022/09/16
- Re: [External] : How to get all paragraphs in list?, Jean Louis, 2022/09/16
- Re: [External] : How to get all paragraphs in list?, Emanuel Berg, 2022/09/16
Re: How to get all paragraphs in list?, Emanuel Berg, 2022/09/05