]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
added function server-shutdown to auto commit org directory.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 17 Jan 2014 16:12:04 +0000 (17:12 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 17 Jan 2014 16:12:04 +0000 (17:12 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
init.el

diff --git a/init.el b/init.el
index 216b55e1d0782d040ee1a52e3ce98d3d08649b08..b9dd65ce1856a4545f0ad23025d44850cda23715 100644 (file)
--- 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)