From: Andreas Gerler Date: Fri, 17 Jan 2014 16:12:04 +0000 (+0100) Subject: added function server-shutdown to auto commit org directory. X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=8e6964772bdc4cd5caffe69a28119ea0203e8c30;p=emacsconfig.git added function server-shutdown to auto commit org directory. Signed-off-by: Andreas Gerler --- diff --git a/init.el b/init.el index 216b55e1..b9dd65ce 100644 --- a/init.el +++ b/init.el @@ -17,6 +17,15 @@ load-path)) (unless (server-running-p) (server-start)) +;; define function to shutdown emacs server instance +(defun server-shutdown () + "Save buffers, Quit, and Shutdown (kill) server" + (interactive) + (save-some-buffers) + (shell-command "git --work-tree ~/org/ --git-dir ~/org/.git commit -a -m 'autocommit'") + (shell-command "git --work-tree ~/org/ --git-dir ~/org/.git push origin") + (kill-emacs) + ) ;;; * http://www.emacswiki.org/emacs/ELPA (require 'package)