GNU bug report logs -
#50726
26.3; Let `count-words(-region)' count only words entirely within the region
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 21 Sep 2021 22:52:01 UTC
Severity: wishlist
Tags: wontfix
Found in version 26.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Enhancement request.
A word that straddles the beginning or end of the region is counted as a
word in the region. It would be good to be able to have such functions
not count such partial words.
___
Here's an example of a command that counts the words in a rectangular
region. By default it excludes words that straddle the row boundaries,
but a prefix arg counts such partial words also.
https://emacs.stackexchange.com/a/68611/105
___
Admittedly, this difference is not so important for a non-rectangular
region, as it has only two boundaries, and a user can see interactively
whether the text at the beginning or end forms a real word. But when
called from Lisp, if you want to exclude such partial words you need to
write some code to adjust the count.
In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19042
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
This bug report was last modified 2 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.