-
-
Save atog/412956 to your computer and use it in GitHub Desktop.
Restart passenger from emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; As seen on | |
;; http://lucky-dip.net/articles/2009/08/06/restart-passenger-from-emacs-using-rinari/ | |
;; 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. | |
(defun restart-passenger () | |
"Restart passenger using the current rinari root" (interactive) | |
(shell-command (concat "touch " (rinari-root) "tmp/restart.txt")) | |
(message "Passenger restarted")) | |
;; And assign it to a key | |
(global-set-key (kbd "C-c ' p") 'restart-passenger) |
Hi, I tried to add a gist under yours, but it kept getting weird markup, so I created this: http://gist.github.com/435966
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
;; you might like this
;; tweaked it so it only loads the settings for rinari mode
;;
;; don't know why, but the code is getting weird markup
(add-hook 'rinari-minor-mode-hook
"Passenger restart, in rinari mode"
(defun my-rinari-hook()
(defun restart-passenger ()
"Restart passenger using the current rinari root" (interactive)
(shell-command (concat "touch " (rinari-root) "tmp/restart.txt"))
(message "Passenger restarted"))
(define-key rinari-minor-mode-map "\C-c'p" 'restart-passenger)))