News for hackers. Stuff that matters.
Re:A few new things in Emacs 29 by smcn on Monday December 19, 2022 @10:05AM (#34052894)
My Emacs is reporting that `count-words` was "Probably introduced at or before Emacs version 24.1." but good post regardless.
Re:A few new things in Emacs 29 by jchmrt on Monday December 19, 2022 @10:12AM (#34052962)
I think the author means that count-words already existed, but only reported words and characters. Now it also reports the amount of sentences.
Re:A few new things in Emacs 29 by smcn on Monday December 19, 2022 @10:15AM (#34052994)
That's entirely my bad. Reread it and it was obvious what was being said!
Re:A few new things in Emacs 29 by gumby on Monday December 19, 2022 @10:15AM (#34053006)
That's odd, as Emacs had this function long before being ported to C/elisp, i.e. over 40 years ago.
Re:A few new things in Emacs 29 by michaelhoffman on Monday December 19, 2022 @10:23AM (#34053106)
Over 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.

Re:A few new things in Emacs 29 by michaelhoffman on Monday December 19, 2022 @10:12AM (#34052966)
> *now also reports the number of sentences*

Emphasis added.

Re:A few new things in Emacs 29 by abudabi123 on Monday December 19, 2022 @12:47PM (#34055054)
WOW That means Emacs has the smarts now to decide where a full stop ends a sentence and can follow up with double spacing.
Re:A few new things in Emacs 29 by mbork_pl on Monday December 19, 2022 @03:30PM (#34057230)
> 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/Se...)

Re:A few new things in Emacs 29 by goosedragons on Monday December 19, 2022 @05:03PM (#34058382)
That's a good convention for people taught typing on a typewriter but pretty bad for younger folks.
Re:A few new things in Emacs 29 by Wildgoose on Tuesday December 20, 2022 @04:38AM (#34063693)
Disagree. 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.

Re:A few new things in Emacs 29 by MadcapJake on Tuesday December 20, 2022 @09:36AM (#34066450)
Perhaps this is true but the convention is no longer in use pedagogically.
Re:A few new things in Emacs 29 by tmtvl on Monday December 19, 2022 @07:43PM (#34059990)
Of course Emacs has a configuration option you can toggle which disables the need for a double space after a sentence.