5 ms·
I guess bloated means compared to 'instant startup'. Vi starts always instantaneously, whereas Emacs can have a noticeable delay, even if it's only a fraction o
by lottin 11y ago
I guess bloated means compared to 'instant startup'. Vi starts always instantaneously, whereas Emacs can have a noticeable delay, even if it's only a fraction of a second. Hence the perception that is bloated. Of course compared to the others you mention is quite fast.
- jdreaver 11y agoThe best way to run emacs IMO is to use "emacs --daemon" to spawn a single daemon process, and then connect to it using emacsclient. Then, startup time is instant!
- dominotw 11y agothen you have to maintain/monitor that daemon, seems like too much work.
- cle 11y agoIf only someone made something that could monitor daemons and make sure they stay running...
- dominotw 11y agothen you have maintain that thing that monitors the daemons.
- unsignedint 11y agoIf your system is using systemd, you can create a service file that does that under --user. I manage some user daemons that way.
- deleted 11y ago[deleted]
- davexunit 11y agoI use the GNU Shepherd init system as an unprivileged user to manage my emacs daemon, and other things like gpg-agent. The real benefit of 'emacs --daemon', for me, isn't the faster client startup time, but the unification of the many programs that may spawn $EDITOR. Rather than each one spawning a new Emacs process, these programs spawn a client in the window I already have open where I can access everything else I was working on. On top of that, I use the ItsAllText extension for Firefox to edit text fields inside of that same Emacs instance, too. Very convenient.
- jdreaver 11y agoWhat? You literally just call emacs --daemon on startup. You can also easily kill it and restart it.
- sigjuice 11y agoThe first line of my ~/.emacs is (start-server). /usr/bin/emacs is launched once and runs forever. I spend nearly all my time in emacs, so there is nothing to maintain/monitor. If emacs dies, it is rather obvious.
- josteink 11y ago> then you have to maintain/monitor that daemon, seems like too much work. This thread over at reddit may kill your concerns :) https://www.reddit.com/r/emacs/comments/45mtdz/can_someone_explain_why_emacsclient_requires_a/ https://www.reddit.com/r/emacs/comments/45mtdz/can_someone_e...
- gkya 11y agoRunning emacs like "$ emacs <text-file>" is like booting a computer, editing a single text file, and then "$ shutdown -h now".
- lispm 11y agoNot really. GNU Emacs is no operating system. It has no network stack, no framebuffer interface, no file system implementation, etc. It provides interfaces to those. As such it does not initialize hardware and it starts no OS during startup. GNU Emacs starts a Lisp environment, loads a memory dump, runs various initialization code, etc.
- gkya 11y agoOh, thankfully someone told me that emacs does not have framebuffers and filesystems. It doesn't have wireless drivers too! My grandparent comment was an analogy, for illustrating how it's not the optimal way to use emacs, as a command line program invoked to operate on one file and then closed and reopened.
- lispm 11y agoThe analogy wasn't that great. Booting a machine has nothing to do with typical uses of Emacs. There are many applications which are long running and are working on multiple documents - it's just another mode of working with an application. One can use GNU Emacs just fine as an editor which starts and quits on a single file. 'emacs -q' starts in a few milliseconds on my Mac. I use single file edits with Emacs on the terminal all the time. Though I usually also have a long running instance of Emacs - but then it is used as a Common Lisp IDE, not just as an editor. Then one can setup an Emacs editor server. Or start the Editor and leave it running. This is no different from, say, a CAD program or any typical application on the Mac, where usually a single instance of an application keeps running, editing multiple documents.
- tptacek 11y agoFine, sure, but I think his point is just: Emacs users don't run Emacs on files; they run Emacs once and then open files with it (or with gnuclient/emacsclient).
- branchless 11y agoI would instantly disregard anyone who says this. Just run it in daemon mode and connect with emacsclient.
- ufo 11y agowhy is that not the default behavior then?
- syrrim 11y agoBecause it would take up memory from everyone, including non-emacs users.
- mrighele 11y agoI think that the best default approach would be to start as a normal emacs process but revert to emacsclient behaviour (i.e. just open a new frame) if a running instance of emacs is detected. This is what web browsers do, for example.
- __david__ 11y agoLuckily, all that takes is: alias emacs="emacsclient -a '' -c" But you're right, I wish that were the default.
- branchless 11y agoThe default behaviour is a bare emacs which starts damn near instantly. If you start adding stuff then it takes time to load, but at this point you should know the daemon is an option.
- edoloughlin 11y agoI used to do that. Then I got a new job that requires Windows 7 and emacs can't start in daemon mode. :(
- 11y ago
- belorn 11y agowell, that's for terminal mode. With a window manager, most application has similar start up time which I assume is caused by similar xorg routines being run. However, running Emacs in daemon mode does reduce this to instant. Not sure why this is.
- ScottBurson 11y agoEmacs has a different usage model. Instead of starting a new Emacs for every file you want to edit, keep one running and edit all your files in it. If you're working on multiple projects, have one Emacs for each project and switch between them.
- e40 11y agoI start emacs once every few weeks, and that's mainly just to do a reset when I finish a project or get to a safe point and want to get a clean slate. The startup time for Emacs is never an issue for me.