News for hackers. Stuff that matters.
Re:Spacemacs – Emacs advanced kit focused on Evil by cranium on Friday April 17, 2015 @11:42AM (#9395014)
I switched a few months ago and I must say I'm really impressed: there is (nearly) no Vim feature I miss!

Out-of-the-box features/packages I like:

- Default powerline is cool

- "guide-key" package: as you may know, Emacs is based on successions of key bindings to call a function, guide-key tells you what key binding you can do next. Example: "SPC p" is the prefix for most "projectile" (project explorer package) commands, so guide-key shows you what keys you can press and its associated function/subgroup. I think it's the best way to learn your key bindings!

- (from vanilla Emacs, enhanced with Helm) M-x: call a function. While it doesn't seem impressive, EVERY ACTION is a function in Emacs! You can call "evil-next-line" (even if it's now really useful) or "set-default-font", and with Helm you can search in real time what you want. If I want to create a table in org-mode: "M-x org cre" brings "org-create-table". No need to remember the function full name!

- org-mode: Think of it as an editor for all non-code tasks. I personally do my graded homeworks in it and then exporting these in latex/pdf. "C-c C-e l o" <- export file in latex, generate pdf and open. Really quick to do!

Final words: happy to have switched to Emacs, I don't really miss my Vim environment because there are a lot of alternatives out of the box in Spacemacs (thanks to the good integration of Evil).

BTW, I still use Vim to do quick edits in the terminal, solely because Emacs takes more time to boot :)

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

Re:Spacemacs – Emacs advanced kit focused on Evil by dan00 on Friday April 17, 2015 @11:51AM (#9395091)
> I switched a few months ago and I must say I'm really impressed: there is (nearly) no Vim feature I miss!

Well, I just tried it literally for a few seconds and just stumbled over the not working text objects.

I really like things like e.g. 'ci(' or 'dat'.

But it always seems like this if I'm trying a vim emulation.

Re:Spacemacs – Emacs advanced kit focused on Evil by hammerandtongs on Friday April 17, 2015 @12:04PM (#9395186)
Evil has full text objects support and ci( works for me though I use Emacs+Evil and not spacemacs.

You'll want to add "evil-surround" for dat

I found little or no disfluencies in the keybindings/text objects etc and I use them extensively. Though you'll want to add some of the core emacs keys to your repertoire as many of them have no natural vim alternative.

Re:Spacemacs – Emacs advanced kit focused on Evil by catern on Friday April 17, 2015 @12:59PM (#9395612)
evil-surround is not necessary for dat, that is present in core evil.
Re:Spacemacs – Emacs advanced kit focused on Evil by mullr on Friday April 17, 2015 @11:57AM (#9395136)
'ci(' works, I just tried it. I don't know the 't' parameter there, but 'da(' works as expected as well.
Re:Spacemacs – Emacs advanced kit focused on Evil by dan00 on Friday April 17, 2015 @12:05PM (#9395194)
Strange, I just restarted spacemacs and now 'ci(' works. In the previous session I've changed some settings and that seems to have irritated spacemacs.

't' is for html tags so pressing 'cit' anywhere on '<width>280</width>' will do what you're expecting. :)

Re:Spacemacs – Emacs advanced kit focused on Evil by mijoharas on Friday April 17, 2015 @12:25PM (#9395370)
I only just noticed this now, but `dit` and `cit` only works in html (and other web derived modes) in spacemacs. I guess some of the stuff only gets set up on the major modes.
Re:Spacemacs – Emacs advanced kit focused on Evil by catern on Friday April 17, 2015 @12:58PM (#9395608)
The "t" text object should work in all modes, if it isn't working for you then there's something going wrong.
Re:Spacemacs – Emacs advanced kit focused on Evil by expando on Friday April 17, 2015 @11:56AM (#9395133)
Every text object I've tried has worked great for me (even non-standard ones like cia/caa from arg-text-objects)