[HN Gopher] A few new things in Emacs 29
___________________________________________________________________
A few new things in Emacs 29
Author : Amorymeltzer
Score : 104 points
Date : 2022-12-19 14:34 UTC (8 hours ago)
(HTM) web link (mbork.pl)
(TXT) w3m dump (mbork.pl)
| smcn wrote:
| My Emacs is reporting that `count-words` was "Probably introduced
| at or before Emacs version 24.1." but good post regardless.
| jchmrt wrote:
| I think the author means that count-words already existed, but
| only reported words and characters. Now it also reports the
| amount of sentences.
| daniel-cussen wrote:
| smcn wrote:
| That's entirely my bad. Reread it and it was obvious what was
| being said!
| michaelhoffman wrote:
| > *now also reports the number of sentences*
|
| Emphasis added.
| abudabi123 wrote:
| _WOW_ 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 wrote:
| > 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...)
| goosedragons wrote:
| That's a good convention for people taught typing on a
| typewriter but pretty bad for younger folks.
| gumby wrote:
| That's odd, as Emacs had this function long before being ported
| to C/elisp, i.e. over 40 years ago.
| michaelhoffman wrote:
| 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.
| mark_l_watson wrote:
| I agree that Emacs 29 contains many improvements, thanks to all
| of the developers and documentation writers.
|
| I am more excited by Emacs 30, mostly I like the ahead of time
| compilation of Lisp code.
| mattarm wrote:
| > I am more excited by Emacs 30, mostly I like the ahead of
| time compilation of Lisp code.
|
| Emacs has had an ahead of time compilation feature, "Native
| Compilation," since Emacs 28. Is this what you mean? Or is the
| Emacs 30 feature something different?
| yaantc wrote:
| Emacs 28 has just in time compilation: the compilation
| happens lazily as a package is loaded. Ahead of time would
| means at installation time I guess.
| agumonkey wrote:
| there's a flag to decide if you want AOT or on-load/on-demand
| native comp
| e3bc54b2 wrote:
| AOT is coming in 29.1.
| josteink wrote:
| Emacs 29 contains so many things OOB that it has completely
| eliminated the use of 70-80% of the packages I use in my day-to-
| day job:
|
| - use-package built in
|
| - csharp-mode (now built in)
|
| - typescript-mode (now built in)
|
| - same with json-mode too.
|
| - project.el instead of projectile
|
| - eglot (now built in) over lsp-mode
|
| As far as Emacs releases goes this one has more functionality
| packed than I can remember in any previous release ever.
| brabel wrote:
| I already use use-package, so that's great... I also use
| projectile and it's been working great... how should I prepare
| to move to project.el? Are there any guides? Or things just
| work the same I am used to, and I just need to delete
| projectile once upgrading?
|
| I also use lsp-* for all IDE features... is eglot going to be
| the better choice here for every language?? LSP works with Go,
| Dart, Java, Zig, Rust, Lua... do I need to remove all my config
| for those to use eglot??
| Barrin92 wrote:
| As an emacs user who has never paid much attention to the
| development pace, is it just that people talk more about Emacs or
| is there actually more momentum around it these days because it
| feels that way. Which is kind of amazing for a piece of software
| that old.
| agumonkey wrote:
| Probably both IMO. Since melpa there's been an increase in
| contributions (it helps not having to be license compatible
| like core emacs extensions I guess), and even then there was
| heavy work like native-comp that landed very very rapidly.
| 323 wrote:
| Another feature is that you can now run VS Code inside, so now
| Emacs finally has a decent text editor:
|
| https://i.redd.it/1a4yhesko26a1.png
| hprotagonist wrote:
| You've been able to do that with exwm for many years.
| [deleted]
| PurpleRamen wrote:
| Is this VS Code running in an internal Webbrowser of emacs?
| Webkit then I guess?
| chimprich wrote:
| > (It never ceases to amaze me that MS Word and its ilk do not
| seem to have equivalents of view-lossage or describe-key or
| where-is. Or am I mistaken?)
|
| (I'm guessing the author means VS Code, not MS Word here?)
|
| There are some features of Emacs that are amazingly useful, have
| been there for years (or decades), but which I haven't yet
| managed to find in any other editor. For example, regional undo:
| select a region of text and step back through changes in that
| region only.
| jolmg wrote:
| > regional undo
|
| Is that from a package?
| wara23arish wrote:
| Nope, i think it's enabled automatically.
| yaantc wrote:
| Not, it's build in: when you undo with a region highlighted
| the undo is limited to the content of this region.
|
| Really nice when you made changes elsewhere and realize late
| that you made a mistake (but not too late: the undo info must
| still be present of course).
| [deleted]
| TeMPOraL wrote:
| > _(I 'm guessing the author means VS Code, not MS Word here?)_
|
| The author might mean MS Word. I definitely had this thought
| about _a lot_ of software of all kinds, not just editors /IDEs.
| The two the author highlighted - view-lossage and describe-key,
| are to answer the questions "what sequence of keys/operations
| I've just performed?", and "what does this key/key sequence do,
| _here, in this context_? ".
|
| The former is useful if you e.g. mistype or type at a wrong
| moment, invoking some random actions in the program, and now
| you're wondering what exactly did you do. Also, since it's
| Emacs, there's actually a quick way to turn lossage into a
| keyboard macro and clean it up - so if you figured you want to
| repeat some sequence of operations after you've already done it
| once, you don't have to record it from scratch.
|
| describe-key approximation exists in _some_ software, typically
| via the "keyboard binding" preferences dialog containing a
| textbox for looking up commands by assigned keyboard shortcut.
| Alas, besides being a worse UX, this will only show you global
| assignments (or, sometimes, divided by categories). describe-
| key excels by showing you context-aware help, i.e. it literally
| tells you what command will be invoked if you press a given key
| sequence exactly where you are right now.
| mbork_pl wrote:
| Author here. Definitely meant MS Word. I know a few people
| using VSCode, and I never heard any one of them saying "I
| clicked/typed something and something strange happened".
| OTOH, this is pretty common with MS Word.
| agumonkey wrote:
| I already forgot that feature.
|
| vscode or msword.. doesn't really matter in a way, any keyboard
| heavy application could give users the history of keypressed,
| it's natural and often useful
|
| tiny side note, word used to have inline macro tags (dos
| version 6 IIRC), so one could type
|
| { if YEAR > 1987 } text { end if }
|
| it was straighforward, and now replaced by GUI heavy systems,
| user interaction has regressed in a way
| IncRnd wrote:
| > (I'm guessing the author means VS Code, not MS Word here?)
|
| I took that to mean that the author painted all non-emacs
| editors as not really being useful editors.
| shakow wrote:
| That's not reading between the lines, that's just inventing a
| new article.
| IncRnd wrote:
| I'm pretty sure it was a fair reading, for people who read
| the article.
|
| The article discussed the option of throwing 40 years of
| development out the window or borrowing/imitating things
| from emacs/vim. Then the MS Word comment was made, "It
| never ceases to amaze me that MS Word and its ilk do not
| seem to have equivalents of ..."
| thom wrote:
| Emacs 29 is now a fully fledged SQLite client, which for me is
| one of the neatest new features.
___________________________________________________________________
(page generated 2022-12-19 23:02 UTC)