From: Daniel Koning <dk@danielkoning.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Kangas <stefan@marxist.se>,
41761@debbugs.gnu.org, pipcet@gmail.com
Subject: bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary
Date: Sat, 15 Aug 2020 12:44:10 -0500 [thread overview]
Message-ID: <m2a6yv7qj9.fsf@danielkoning.com> (raw)
In-Reply-To: <838sefkh5t.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Aug 2020 19:28:14 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> +** 'count-words' now skips field boundaries.
>> +Before, 'count-words' incorrectly stopped counting the number of words
>> +in buffer at a field boundary. This bug has been fixed.
>
> I don't think it was a bug, so the wording should be different.
If the old behavior didn't qualify as a bug, then wouldn't you say the
docstring was buggy? It said that the function returned or printed
something that it really didn't ("the number of words between START and
END"). And there's nothing in the docs to suggest that we should read
that as "between START and END, or between START and the next field
boundary if that boundary comes before END."
(Nor does this rule apply to the other tallies that the function makes.
Put an extra line of text beneath the line containing the several
fields, and the interactive `count-words' message will reflect that line
in its line count and character count, but not in its word count. So
between "(defun count-words" and its matching ")", something is amiss,
whether it's code or documentation.)
If you don't like the word "bug" for this, the NEWS item might at least
mention that the prior behavior was undocumented and inconsistent, just
to clarify why the manual entry isn't changing along with the code.
Daniel
next prev parent reply other threads:[~2020-08-15 17:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 16:52 bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary Pip Cet
2020-06-10 20:15 ` bug#41761: [PATCH] " Daniel Koning
2020-08-14 9:58 ` Stefan Kangas
2020-08-14 11:08 ` Eli Zaretskii
2020-08-14 18:48 ` Daniel Koning
2020-08-14 19:15 ` Eli Zaretskii
2020-08-14 19:44 ` Daniel Koning
2020-08-15 6:30 ` Eli Zaretskii
2020-08-14 23:06 ` Stefan Kangas
2020-08-15 16:28 ` Eli Zaretskii
2020-08-15 17:44 ` Daniel Koning [this message]
2020-08-15 17:48 ` Eli Zaretskii
2020-08-15 19:44 ` Daniel Koning
2020-08-16 14:12 ` Eli Zaretskii
2020-08-16 19:04 ` Daniel Koning
2020-08-16 19:27 ` Eli Zaretskii
2020-08-16 19:37 ` Daniel Koning
2020-08-17 13:51 ` Stefan Kangas
2020-08-17 16:12 ` 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=m2a6yv7qj9.fsf@danielkoning.com \
--to=dk@danielkoning.com \
--cc=41761@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=pipcet@gmail.com \
--cc=stefan@marxist.se \
/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.