From 8e6964772bdc4cd5caffe69a28119ea0203e8c30 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 17 Jan 2014 17:12:04 +0100 Subject: [PATCH] added function server-shutdown to auto commit org directory. Signed-off-by: Andreas Gerler --- init.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- 2.47.3