Archive for the ‘emacs’ Category

incremental search for cocoa

Tuesday, June 24th, 2008

After downloading the plugin ages ago, I finally got around to installing the incremental search input manager which adds emacs-style incremental search to cocoa text widgets on OS X. I had problems getting it to work on leopard until I discovered some Leopard-specific issues with input managers. What I ended up doing was:

  1. build from source using XCode
  2. sudo cp -pR IncrementalSearchInputManager /Library/InputManagers
  3. sudo chmod -R go-w /Library/InputManagers
  4. sudo chown -R root:admin /Library/InputManagers
  5. sudo chmod a-x /Library/InputManagers/IncrementalSearchInputManager/IncrementalSearchInputManager.bundle/Contents/MacOS/IncrementalSearchInputManage

Of course while writing this post I discovered that there’s a universal binary available on the author’s site, so maybe I didn’t need to rebuild at all. In fact, I was trying to use a PPC binary on an intel machine the whole time, so maybe the instructions in the readme are, in fact, ok. The whole situation is confusing though, as the sourceforge wiki seems not to be updated and most of the pages linked to on the web are MIA.

Anyway, it can be done, and life is happy.

Update: or maybe not.  I can’t get it to work in Mail.app or Xcode.  Doh.

Emacs.app highlighting madness

Saturday, August 11th, 2007

After finally getting my keyboard set up as I like it and sitting down to code, I discovered a new feature of Emacs.app for OS X, kind of.  Placing the cursor on an opening or closing delimiter (paren, brace) highlights the whole expression by default.  Unfortunately the default color choice turns my screen unreadable every time I put the cursor on an opening brace of a long class definition, flashes the arguments of a function call every time I type it, and otherwise continually taunts me.

With the help of the emacs-app-dev- mailing list I discovered the the culprit is mic-paren.el, a lisp package that extends the usual paren matching package paren.el.  (setq paren-sexp-mode nil) has restored peace to my screen.

At last!

Friday, July 27th, 2007

Thanks to the very wonderful KeyRemap4MacBook I now have a useable macbook pro! The “eisuu” and “kana” keys, on either side of the spacebar on japanese keyboards, are now mapped to control so I can emacs away with my thumbs. If you use emacs, doing this can save you a lot of pain, quite literally. No more nerve-pinching little-finger moves.