News for hackers. Stuff that matters.
Re:Spacemacs – Emacs advanced kit focused on Evil by atjoslin on Friday April 17, 2015 @11:46AM (#9395056)
Run `emacs -nw --daemon` to start a background emacs server.

Now, you can do `emacsclient -nw <file>` to boot up with almost no startup time. I have vi aliased to this, and `emacs -nw --daemon` opened by launchctl.

A gotcha: If you change your emacs config and need to restart, be sure to `pkill emacs` to get rid of the daemon.

Re:Spacemacs – Emacs advanced kit focused on Evil by michaelsbradley on Friday April 17, 2015 @01:51PM (#9395981)
I have these in ~/.bash_aliases:

    alias e="emacsclient -t -a ''"
    alias eb="emacsbare"
    alias ec="emacsclient -c -n -a ''"
    alias emacsbare="emacs -nw -Q --eval \"(load-theme 'misterioso)\""
    alias vim="e"
    alias vi="e"
eb/emacsbare very quickly fires up a "clean" (ignores init files) terminal-mode Emacs instance.

e/vim/vi launches a terminal-mode client for the Emacs daemon, which only takes a split-second if the daemon is already running. If the daemon isn't running, it gets started automatically by virtue of the empty string being passed with the -a flag, per the man page for emacsclient.

ec launches a "gui-mode" (X/quartz) client for the daemon, which is started automatically if isn't running, same as before.

Re:Spacemacs – Emacs advanced kit focused on Evil by DonHopkins on Friday April 17, 2015 @09:30PM (#9398028)
UniPress "Evil Software Hoarder [TM]" Emacs had a vi emulation mode such that when you typed ":q", it flipped you over into an Emacs shell window with key bindings to behave just like you'd expect had you actually exited your text editor. Of course the shell mode was hacked so "vi foo.c" would flip you back into a vi-mode buffer on foo.c. Poor innocent vi users didn't even realize they hadn't left the editor! It was kind of like being in the Ematrix.
Re:Spacemacs – Emacs advanced kit focused on Evil by znpy on Friday April 17, 2015 @02:06PM (#9396080)
Actually, inside any client, you can do M-x eval-buffer and re-evaluate your whole .emacs.

http://www.gnu.org/software/emacs/manual/html_node/emacs/Lis...

A note: I' be careful though, because depending on how you create your variables, thing can go wrong, I guess: if you-re going to use eval-buffer on your whole .emacs, I'd better use, for example, add-hook instead to add-to-list:

    (add-hook c-mode-hook 'linum'mode)
instead of:

    (add-to-list c-mode-hook 'linum-mode)
Just saying. Have fun with your configs :)
Re:Spacemacs – Emacs advanced kit focused on Evil by hollerith on Friday April 17, 2015 @03:57PM (#9396838)
The first arg to add-hook must be a symbol, like so:

   (add-hook 'c-mode-hook 'linum-mode)
Re:Spacemacs – Emacs advanced kit focused on Evil by LukeShu on Friday April 17, 2015 @12:09PM (#9395239)
Or `emacsclient -e '(kill-emacs)'` in case you have anything open or whatever.
Re:Spacemacs – Emacs advanced kit focused on Evil by manish_gill on Friday April 17, 2015 @01:04PM (#9395640)
The one thing I hate about emacs client (and I was bitching about it on #emacs the other day as well) is that in OS X, a windowed client will just "hang" when exited. It will still be visible in the cmd-tab list, and thus isn't truly exited. Hence, if I want to remove that annoying non-running client, I basically have to kill the daemon and restart. This is particularly annoying when I'm editing configuration.

And in many cases, using just the terminal isn't enough because there are quite a few quirks when using emacs in the terminal, the most recent one I found was that <shift><tab> is interpreted as M-[.

I wish there was some way to fix this. :(

Re:Spacemacs – Emacs advanced kit focused on Evil by JadeNB on Sunday April 19, 2015 @09:28PM (#9405669)
I don't have an `.app`-ified copy of Emacs around to check, but there is a way to hide apps from the Dock and the Cmd-Tab switcher; see http://hints.macworld.com/article.php?story=2001070119151826... . Specifically, you can add

    <key>LSUIElement</key>
    <true />
to your app's Info plist (at `$PATH_TO_APP/Contents/Info.plist`). As the other comments point out, this also hides the app's menubar, which may or may not be desireable.
Re:Spacemacs – Emacs advanced kit focused on Evil by psibi on Friday April 17, 2015 @02:31PM (#9396227)
I think the hanging thing can be solved by invoking emacsclient in the following way: `emacsclient -n`.
Re:Spacemacs – Emacs advanced kit focused on Evil by michaelsbradley on Friday April 17, 2015 @03:24PM (#9396610)
-n serves a different purpose (the command returns immediately). Even when using that flag, there will be an Emacs icon in the cmd-tab list and the dock after the client is closed.
Re:Spacemacs – Emacs advanced kit focused on Evil by michaelsbradley on Friday April 17, 2015 @02:00PM (#9396044)
It's not the client that hangs around in the cmd-tab list (and as an icon in the dock) – what's signified is the process for the Emacs daemon.

I agree that it would be nice if it could be configured/made to disappear.

I use terminal-mode emacsclient on my Mac all day everyday, and `C-h k` shows <shift+tab> is interpreted as <backtab>. That's the case for Terminal.app and iTerm2, though I only use the latter. I'm not sure why yours interprets it as M-[.

Re:Spacemacs – Emacs advanced kit focused on Evil by qnaal on Friday April 17, 2015 @11:05PM (#9398182)
if you're going to daemonize, make sure you use lucid emacs, unless you're the kind of person who never restarts their X server.

the gtk version crashes the emacs server when X exits, see: https://bugzilla.gnome.org/show_bug.cgi?id=85715