count-words(2)count-words - Count the number of words in a region
n count-words (esc C-c)
count-words counts the number of words in the current buffer and between the set-mark(2) position and the current cursor position. The command also gives statistics on the average characters per word, the number of characters and the number of lines. The output appears on the message line in a format such as:-
Buffer: 3959 Words (4.7), 23394 Chars, 274 Lines Region: 154 Words (5.2), 983 Chars, 10 Lines
The $result(5) variable is also set to the same output string.
The numeric argument n is used to modify the default behavior of the command, where the bits are defined as follows:
0x01
0x02
0x04
0x08
When n is not specified, the default value is 0x0f, i.e. print both whole buffer and region information without error.
(c) Copyright JASSPA 2025
Last Modified: 2024/10/06
Generated On: 2025/09/29