legacy-dotfiles/emacs.d/elisp/manage-org.el
Tom Willemsen 62f897fdf5 New .emacs style
* .emacs only loops through .emacs.d and runs the *.el files there.

 * files are automatically compiled before loading. But only if it
   hasn't already been compiled.

 * all emacs el files, save for the startup scripts, have been moved
   to .emacs.d/elisp
2011-02-21 00:27:43 +01:00

40 lines
1.2 KiB
EmacsLisp

(defun clone-org-files ()
(interactive)
(if (= (shell-command
"git clone git@82.170.172.156:private/org.git ~/prj/org"
"*Messages*" "*Messages*") 0)
(message "success!")
(message "failed!")))
(defun get-org-files ()
(interactive)
(let ((prev-dir (getenv "PWD")))
(if (= (shell-command
(format "cd ~/prj/org/; git pull origin master; cd %s" prev-dir)
"*Messages*" "*Messages*") 0)
(message "success!")
(message "failed!"))))
(defun save-org-files ()
(interactive)
(let ((prev-dir (getenv "PWD")))
(if (= (shell-command
(format
"cd ~/prj/org/; git add .; git commit -m \"Change for %s\"; cd %s"
(format-time-string "%Y-%m-%d at %H:%M:%S")
prev-dir)
"*Messages*" "*Messages*") 0)
(message "success!")
(message "failed!"))))
(defun push-org-files ()
(interactive)
(let ((prev-dir (getenv "PWD")))
(if (= (shell-command
(format
"cd ~/prj/org/; git push origin master; cd %s" prev-dir)
"*Messages*" "*Messages*") 0)
(message "success!")
(message "failed!"))))
(provide 'manage-org)