[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only
From: |
Daniel Koning |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (darwin) |
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
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Stefan Kangas, 2020/08/14
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Eli Zaretskii, 2020/08/14
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Daniel Koning, 2020/08/14
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Stefan Kangas, 2020/08/14
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Eli Zaretskii, 2020/08/15
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary,
Daniel Koning <=
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Eli Zaretskii, 2020/08/15
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Daniel Koning, 2020/08/15
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Eli Zaretskii, 2020/08/16
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Daniel Koning, 2020/08/16
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Eli Zaretskii, 2020/08/16
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Daniel Koning, 2020/08/16
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Stefan Kangas, 2020/08/17
- bug#41761: [PATCH] bug#41761: 28.0.50; M-x count-words counts words only up to a field boundary, Eli Zaretskii, 2020/08/17