[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Counting sentences in `count-words'
From: |
Manuel Giraud |
Subject: |
Re: Counting sentences in `count-words' |
Date: |
Wed, 25 May 2022 10:17:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix) |
Filipp Gunbin <fgunbin@fastmail.fm> writes:
> With just a single newline in file, (count-sentences (point-min)
> (point-max)) loops indefinitely.
Hi Filipp,
I'm not able to reproduce. For me™, it returns 0. I've tried with both
DOS and Unix line terminator.
> 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.
Maybe you're right, I can then avoid modifying 'forward-sentence'.
--
Manuel Giraud
- Re: Counting sentences in `count-words', (continued)
- 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, 2022/05/24
- Re: Counting sentences in `count-words',
Manuel Giraud <=
- Re: Counting sentences in `count-words', Filipp Gunbin, 2022/05/25
- Re: Counting sentences in `count-words', Eli Zaretskii, 2022/05/29