Closed developernotes closed 14 years ago
Seems like a function that definitely should be in Rinari!
A question about your code though. Why do you use an if-statement with a progn for the true case and nil in the false case?
Wouldn't this be just as good? (defun rinari-web-server-restart (&optional edit-cmd-args) "If rinari-web-server is running, kill it and start a new server, otherwise just launch the server" (interactive "P") (let ((rinari-web-server-buffer "server")) (when (get-buffer rinari-web-server-buffer) (set-process-query-on-exit-flag (get-buffer-process rinari-web-server-buffer) nil) (kill-buffer rinari-web-server-buffer)) (rinari-web-server edit-cmd-args)))
rejeep,
That sounds good, I'll make an adjustment and create a new pull request. Thanks.
Hello,
I've added a function to ease killing and restarting the web server in rinari called rinari-web-server-restart. It checks for a running server and kills it if found, subsequently relaunching a server.
Thanks.