5 ms·
My Emacs is reporting that `count-words` was "Probably introduced at or before Emacs version 24.1." but good post regardless.
by smcn 4y ago
My Emacs is reporting that `count-words` was "Probably introduced at or before Emacs version 24.1." but good post regardless.
- michaelhoffman 4y ago> *now also reports the number of sentences* Emphasis added.
- abudabi123 4y agoWOW That means Emacs has the smarts now to decide where a full stop ends a sentence and can follow up with double spacing.
- mbork_pl 4y ago> The sentence commands assume that you follow the American typist’s convention of putting two spaces at the end of a sentence. That is, a sentence ends wherever there is a ‘.’, ‘?’ or ‘!’ followed by the end of a line or two spaces, with any number of ‘)’, ‘]’, ‘'’, or ‘"’ characters allowed in between. A sentence also begins or ends wherever a paragraph begins or ends. It is useful to follow this convention, because it allows the Emacs sentence commands to distinguish between periods that end a sentence and periods that indicate abbreviations. (https://www.gnu.org/software/emacs/manual/html_node/emacs/Sentences.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Se...)
- goosedragons 4y agoThat's a good convention for people taught typing on a typewriter but pretty bad for younger folks.
- Wildgoose 4y agoDisagree. I wasn't taught on a typewriter, (although my mother did teach typing), but any plain text will be aided by that convention. Yes, it's not necessary with justified text when using (for example) TeX. But seeing a solid wall of text in a long paragraph with no hints as to its sentence structure other than a tiny "."? No thanks.
- MadcapJake 4y agoPerhaps this is true but the convention is no longer in use pedagogically.
- tmtvl 4y agoOf course Emacs has a configuration option you can toggle which disables the need for a double space after a sentence.
- jchmrt 4y agoI think the author means that count-words already existed, but only reported words and characters. Now it also reports the amount of sentences.
- smcn 4y agoThat's entirely my bad. Reread it and it was obvious what was being said!
- daniel-cussen 4y ago
- gumby 4y agoThat's odd, as Emacs had this function long before being ported to C/elisp, i.e. over 40 years ago.
- michaelhoffman 4y agoOver 40 years ago is definitely "at or before" Emacs 24.1. Specifically before. As far as I can tell, the "probably introduced at or before" info comes from finding a symbol's first appearance in NEWS. So if there were no changes to `count-words` between Emacs 1 and 24, this is what you'd get.