From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: Eli Zaretskii <eliz@gnu.org>, larsi@gnus.org, emacs-devel@gnu.org
Subject: Re: Counting sentences in `count-words'
Date: Tue, 24 May 2022 18:57:58 +0300 [thread overview]
Message-ID: <m2k0aahqih.fsf@fastmail.fm> (raw)
In-Reply-To: <871qwk9ykq.fsf@elite.giraud> (Manuel Giraud's message of "Mon, 23 May 2022 15:18:45 +0200")
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
next prev parent reply other threads:[~2022-05-24 15:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 12:16 Counting sentences in `count-words' Manuel Giraud
2022-05-21 9:26 ` Eli Zaretskii
2022-05-21 17:07 ` Manuel Giraud
2022-05-21 17:32 ` Eli Zaretskii
2022-05-22 12:42 ` Manuel Giraud
2022-05-22 16:52 ` Visuwesh
2022-05-23 8:16 ` Manuel Giraud
2022-05-23 11:06 ` Eli Zaretskii
2022-05-23 11:09 ` Lars Ingebrigtsen
2022-05-23 12:23 ` Manuel Giraud
2022-05-23 12:39 ` Eli Zaretskii
2022-05-23 13:18 ` Manuel Giraud
2022-05-24 15:57 ` Filipp Gunbin [this message]
2022-05-25 8:17 ` Manuel Giraud
2022-05-25 10:13 ` Filipp Gunbin
2022-05-29 8:02 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k0aahqih.fsf@fastmail.fm \
--to=fgunbin@fastmail.fm \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=manuel@ledu-giraud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.