emacs-devel
[Top][All Lists]
Advanced

[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: Wed, 25 May 2022 13:13:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

On 25/05/2022 10:17 +0200, Manuel Giraud wrote:

> 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'.

Ah, sorry, I tried just the count-sentences, without modification of
forward-sentence.

Filipp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]