Being able to completely re-program your editor is fun. I feel like I've got a long way to go before I'm an Emacs Guru (if anybody *ever* becomes a true Emacs Guru), but it's nice being able to easily automate things I do in my editor.

I've been experimenting with using Passenger in development instead of script/server. It's not too bad. It's nice to have a server always ready to go, but it does make dropping down to the debugger difficult.

Anyway, here is a small snippet of emacs lisp to easily restart the Passenger server for the project you are currently working on. It assumes you have Rinari installed.

The function:

(defun restart-passenger ()
  "Restart passenger using the current rinari root" (interactive)
  (shell-command (concat "touch " (rinari-root) "tmp/restart.txt")))

And to bind it to a key

(global-set-key (kbd "C-c ' p") 'restart-passenger)

blog comments powered by Disqus