My Latest Emacs Discoveries

Remy Honig bio photo By Remy Honig Comment

Emacs Mac Port

https://github.com/railwaycat/emacs-mac-port

This is "Mac port" addition to GNU Emacs 24. This provides a native GUI support for Mac OS X 10.4 - 10.10. Note that Emacs 23 and later already contain the official GUI support via the NS (Cocoa) port for Mac OS X 10.4 and later. So if it is good enough for you, then you don't need to try this.

This distribution of Emacs works a bit smoother than the GNU distro on OSX. Smooth pixel resolution scrolling instead of per line. It can display images partly in the buffer and it seems to be more responsive.

It has a customizations for assigning modifier keys to the cmd and alt keys which by default work the other way around in the GNU version.

See this comprehensive list of features as well.

Php Mode

https://github.com/jorissteyn/php-mode

The standard PHP mode package from MELPA has some quircks and does not indent or syntax color version 5.6 of PHP like it should. This version does.

God Mode

https://github.com/chrisdone/god-mode

This is a global minor mode for entering Emacs commands without modifier keys. It's similar to Vim's separation of commands and insertion mode.

I've bound this to M-[ and I will try it out. I suspect I will not really get into it, but I'll have to see.

Ace Window

https://github.com/abo-abo/ace-window

I'm sure you're aware of other-window command. While it's great for two windows, it quickly loses it's value when there are more windows: you need to call it many times, and since it's not easily predictable, you have to check each time if you're in the window that you wanted.

Another approach is to use windmove-left, windmove-up etc. These are fast and predictable. Their disadvantage is that they need 4 key bindings. The default ones are shift+arrows, which are hard to reach.

This package aims to take the speed and predictability of windmove and pack it into a single key binding, similar to other-window.

I discovered ace-window at http://oremacs.com. The blog is highly recommended as well.

Req Package

https://github.com/edvorg/req-package

req-package is a macro wrapper on top of use-package. It’s goal is to simplify package dependencies management, when using use-package for your .emacs.

If you don't already use use-package or re-package you are missing out. I use it primarily to keep my init.el orderly, bind keys in a clean way and to defer yasnippet loading to keep my startup time short.

1 (req-package yasnippet
2     :config t
3     :defer t
4     :idle (yas-global-mode 1))

Anchored Transpose

http://www.emacswiki.org/emacs/AnchoredTranspose

anchored-transpose.el (a newer version is in nXhtml - but it might miss the fuzziness) defines an interactive autoloaded function to transpose portions of a region around an anchor phrase.

I always hated to swap two parts of a line which I regulary do while programming but I did not know a better way than:

  • select first part
  • cut
  • remember where this part was because the only clue will be a missing part
  • move to start of second part
  • paste
  • select second part
  • cut
  • move to previous location of the first part
  • past

The new way cuts down the number of operations:

  • select region from and including the first part to the entire second part (3 tot 8)
  • C-x t for the first time
  • select region between the parts to I want swapped
  • C-x t for the second time
1 aaa|bbb ccc ddd|eee
2 aaa bbb|ccc|ddd eee
3 aaa ddd ccc bbb eee