[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Counting sentences in `count-words'
From: |
Filipp Gunbin |
Subject: |
Re: Counting sentences in `count-words' |
Date: |
Tue, 24 May 2022 18:57:58 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) |
On 23/05/2022 15:18 +0200, Manuel Giraud wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> It may be better to move count-sentences to paragraphs.el.
>
> Ok. Here is a new version of the patch.
>
With just a single newline in file, (count-sentences (point-min)
(point-max)) loops indefinitely.
I guess there're two options for safe movement:
- Either rely on what movement function returns - in this case
forward-sentence doesn't specify return value, so no luck
- Or track the point yourself, and check whether you've moved. I think
you should do this here.
Filipp
- Re: Counting sentences in `count-words', (continued)
- Re: Counting sentences in `count-words', Manuel Giraud, 2022/05/21
- Re: Counting sentences in `count-words', Eli Zaretskii, 2022/05/21
- Re: Counting sentences in `count-words', Manuel Giraud, 2022/05/22
- Re: Counting sentences in `count-words', Visuwesh, 2022/05/22
- Re: Counting sentences in `count-words', Manuel Giraud, 2022/05/23
- Re: Counting sentences in `count-words', Eli Zaretskii, 2022/05/23
- Re: Counting sentences in `count-words', Lars Ingebrigtsen, 2022/05/23
- Re: Counting sentences in `count-words', Manuel Giraud, 2022/05/23
- Re: Counting sentences in `count-words', Eli Zaretskii, 2022/05/23
- Re: Counting sentences in `count-words', Manuel Giraud, 2022/05/23
- Re: Counting sentences in `count-words',
Filipp Gunbin <=
- Re: Counting sentences in `count-words', Manuel Giraud, 2022/05/25
- Re: Counting sentences in `count-words', Filipp Gunbin, 2022/05/25
- Re: Counting sentences in `count-words', Eli Zaretskii, 2022/05/29