4 ms·
For instant startup I recommend daemon mode and emacsclient. Start emacs via emacs --daemon, open windows (in the terminal or otherwise) via `emacsclient` / `em
by wging 2y ago
For instant startup I recommend daemon mode and emacsclient. Start emacs via emacs --daemon, open windows (in the terminal or otherwise) via `emacsclient` / `emacsclient -nc` (I use aliases for these).
- musicale 2y agoYep, warm start is the only way to go unfortunately. But I want a fast start from cold boot like classic vi.
- sping 2y agoThough trying to run Emacs like vi is a pitfall in itself. Clunking around the terminal summoning Emacs to edit files is really not a particularly effective way to use it. Emacs is not vi, and using Emacs like Emacs makes more sense. Most users explore your filesystem and spawn and monitor processes from within Emacs, rather than from a terminal. Not that you can't work that way (and using `emacsclient` is the way to do it), but you're losing out by trying to shoe-horn usage patterns familiar from other toolchains onto Emacs. Emacs is not a text editor, it's a text manipulation platform that includes an editor - a number of editors in fact, including a vim clone.
- rbc 2y agoI think running daemon mode has significant advantages. You can have frames running on multiple virtual desktops for different uses. You can also step away from a buffer, and return to it, maybe from some other location on a different computer.
- perihelions 2y agoI wrap my slow .emacs loads inside #'run-with-idle-timer so they run when I'm not looking, and not likely to notice.
- andbberger 2y agowhat is this point of this, when would you not be using emacs?
- perihelions 2y agoOnly needs a few seconds of idle time to load libraries.
- stackghost 2y agoThe solution to "this text editor takes too long to start up" is poorly addressed by the solution to "just leave it running in the background all the time".
- dokyun 2y agoIt really is not poorly addressed, as it's a reasonable solution to the issue which also brings about it's own benefits. If you have your system configured such that the Emacs server starts up when you log in, by the time you actually start Emacs it will long have already loaded completely. If you actually use your Emacs for several things throughout the day, including but not limited to reading and editing text and documents, then it is likely you will have it always running during that time with several files open, and will find it useful to be using Emacs in the same state it was in the last time you opened it. As an aside, having it running in the background was actually the way the original EMACS that ran on ITS was intended to be used: When you C-x C-c out of it, it does not kill the program, it simply puts it in the background, and the next time you invoke EMACS it brings it back up. This is similar in effect to hitting C-z, then using 'fg' to bring it up again, but this only really works in a terminal. The Emacs server achieves the intended effect better, especially on a graphical display.
- iLemming 2y agoIt's not a "solution"; you still need to solve your undesirably slow startup, but if you're having to kill and restart Emacs multiple times a day, something is wrong with your workflow. Normally, Emacs doesn't require restart - for weeks and months in some cases. emacsclient is useful on its own. For example, I use it to edit just about any text, in any input box in any app, delegating the task to Emacs, or when I want to open some URL in Emacs, while browsing a web page in my browser, or to send some selected text to Emacs.
- stackghost 2y agoThis has strong "you're holding it wrong" energy.
- 2y ago