64 points · by gk1 · 10y ago · 46 comments
Launch emacs once ever and use emacsclient for the typical short-duration invoke/shutdown use cases.
#!/bin/sh
emacsclient -t $@ || (emacs --daemon && emacsclient -t $@)
You'll want something like (unless (server-running-p)
(server-start))
in your init file.I have a one-liner shell script called 'em' that just runs 'emacsclient -t $*' so that it can be set as $VISUAL and used by whatever command line tools use that.
https://git.dthompson.us/dotfiles.git/blob/HEAD:/dotfiles/.d...
However, I am bummed by emacsclient's inability to open multiple files from the command line.
And apparently the total lack of a Tab-like experience on Emacs in general. I used to use "vim -p" SO MUCH.
I've also tried evil-tabs, which doesn't work with spacemacs, at all. And eyebrowse doesn't actually use tabs (also it doesn't maintain working directory state when opening a new workspace, fun!)
I dunno, emacs is very much, "Here's a half-implemented solution that pays zero attention to ergonomics. Just... y'know, fix the rest of it so it doesn't totally suck."
And I just don't have the experience to do that yet. Which is why I'm using Spacemacs. Which more or less actually tries to do the ergonomics correctly.
edit: I'm also hoping Cunningham's Law works in my favor here.
emacs --batch --eval '(dump-emacs "em" "/usr/local/bin/emacs")'
This would load everything from your .emacs file into a fresh executable that would then start instantly.Unfortunately, since I've done it last, it seems that this feature has been 'fixed' with emacs now printing that it can only be dumped once. Never had a problem with multiple dumping before.
Like another poster said, there are so many things in Emacs that are half-baked and/or don't play well with other popular extensions. It's really annoying. I wanted to like Emacs, but I'm finding a better experience with Vim.
Edit: As an example of breakages with evil-mode, sometimes evil-mode would end up in a state where pressing 'd' once in normal mode would delete the whole line (which is supposed to be bound to 'dd') and I was unable to access any other combinations with 'd' as a result (e.g. 'd$' to delete to the end of line). It was annoying and happened fairly often, but was not reproducible (as in 'on demand') for me. IIRC, this spanned all buffers and I just had to restart Emacs to fix it.
https://www.reddit.com/r/emacs/comments/3kqt6e/2_easy_little...
Spacemacs recommends[0] using `emacs-mac-port` via homebrew on OSX, but warns of the "strange"[1] emacs server behavior:
""" Note that the emacs-mac-port server behaves differently than the regular Emacs server. Details can be found on the emacs-mac-port README[1]. """
Has anyone taken the time to figure out a workaround to make this work in the traditional emacs manner?
[0] https://github.com/syl20bnr/spacemacs#os-x [1] https://github.com/railwaycat/emacs-mac-port/blob/master/REA...
It was slow to load back then on an early 90s HP/UX workstation. And it's slow to load now on a modern quad core i7 machine with 16 gigs of RAM and an SSD drive.
How this can be baffles me. I don't know what they're doing wrong, but it continues to grow and grow.
Depends on what part of your "development system" you're talking about. If your test suite takes a minute to load before it will even execute a single test, I'd argue that you might want to see what can be done about it.