News for hackers. Stuff that matters.
Re:Using Emacs as $Editor by cmrdporcupine on Monday October 02, 2023 @09:18AM (#37737676)
I used emacsclient for many years but these days, TBH emacs with the right knobs twiddled starts up at usually an entirely reasonable speed.

But definitely out of the box with a stock emacs install it seems too interested in doing a bunch of stuff that gets in the way.

My EDITOR has been just regular "emacs" for years now.

Re:Using Emacs as $Editor by mbork_pl on Monday October 02, 2023 @09:46AM (#37738034)
Speed is not the only thing `emacsclient` addresses. When your $EDITOR is `emacsclient`, the newly spawned frame will share state (kill ring, buffer list etc.) with your Emacs server. This might be helpful e.g. when you (like me) are a heavy user of `dabbrev-expand`, and also with numerous other little things.
Re:Using Emacs as $Editor by vifon on Monday October 02, 2023 @10:25AM (#37738552)
My relatively new stance is that sometimes having an Emacs process that doesn't share the state is a feature, not a flaw. Specifically I started using non-daemon Emacs processes alongside my main Emacs daemon to compartmentalize my work. Each non-trivial project, or "workspace", gets its own Emacs process, possibly with a persistent state with desktop-save & desktop-change-dir. The newish tab-bar-mode helps with that a lot as I cannot stand using multiple frames on a non-daemon Emacs due to it not always being obvious when I close just a frame and when I close the whole process.
Re:Using Emacs as $Editor by cmrdporcupine on Monday October 02, 2023 @11:01AM (#37739021)
Yeah I personally prefer to have the separation of buffer sets between tasks. Especially for something as transient as "write a git commit message" or do an interactive rebase, or write a quick note.
Re:Using Emacs as $Editor by mbork_pl on Monday October 02, 2023 @11:07AM (#37739114)
A personal preference is a personal preference, ofc, but what exactly are the actual benefits?
Re:Using Emacs as $Editor by Scarbutt on Monday October 02, 2023 @02:49PM (#37742680)
While project.el or projectile.el are good sometimes you don't want to see anything else except your current project. A new instance is an easy way to achieve that.
Re:Using Emacs as $Editor by mbork_pl on Monday October 02, 2023 @11:06AM (#37739105)
> My relatively new stance is that sometimes having an Emacs process that doesn't share the state is a feature, not a flaw.

That is a fair point, though not really fitting my workflow. (Also, my Emacs needs ~20 seconds to start, and I tend to have Emacs uptime of several days or sometimes even weeks.)

> I cannot stand using multiple frames on a non-daemon Emacs due to it not always being obvious when I close just a frame and when I close the whole process.

This is strange. In my Emacs, C-x 5 0 on the last frame results in "Attempt to delete the sole visible or iconified frame". (And I have `(setq confirm-kill-emacs #'yes-or-no-p)` in my init.el anyway.)

Re:Using Emacs as $Editor by vifon on Monday October 02, 2023 @11:10AM (#37739147)
Yes, C-x 5 0 is safe, but I often use my window manager's keybinding for closing a window instead. Customizing confirm-kill-emacs sounds like a great idea, I'll consider it, thanks!
Re:Using Emacs as $Editor by hsbauauvhabzb on Monday October 02, 2023 @04:38PM (#37744088)
I think your opinion as built is reasonable, but wouldn’t a better mechanism be an internal segregation concept?
Re:Using Emacs as $Editor by firewolf34 on Monday October 02, 2023 @05:42PM (#37744860)
Emacs supports a "projects" concept: https://www.gnu.org/software/emacs/manual/html_node/emacs/Pr...

This is useful for segregating groups of work related to a set of files but I would be interested if there's anything for arbitrary unsaved buffers in general.

Re:Using Emacs as $Editor by oefrha on Monday October 02, 2023 @11:31AM (#37739420)
Depends on what you mean by entirely reasonable.

I’m by no means a package maniac, and I lazyload with use-package almost entirely, but a cold start still takes a second or two. To me, a choice between a second or two and instantly is a no brainer.