Start the server if not already

This commit is contained in:
Case Duckworth 2022-04-12 13:15:08 -05:00
parent f479cd9b30
commit c0fa442767
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@
(save-buffer)
(condition-case e
(url-retrieve-synchronously "http://localhost:8080/reload")
(file-error (message "Couldn't ping awful's server. Is it running?"))
(file-error (progn
(message "Couldn't ping awful's server. Starting...")
(start-process "awful" (generate-new-buffer "*awful*")
"awful" "--development-mode" (buffer-file-name))))
(t (message "Some awful error occurred!"))))
(provide '+chicken)