From dc8f03e2eb4730637dd3b5efc0cbaab992de0368 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Thu, 28 Mar 2024 00:26:27 -0400 Subject: [PATCH] Begin migration of orgzly files to git. --- .gitmodules | 3 +++ git-auto-commit-mode | 1 + global.org | 12 +++++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 160000 git-auto-commit-mode diff --git a/.gitmodules b/.gitmodules index dc31435..7de3c52 100644 --- a/.gitmodules +++ b/.gitmodules @@ -151,3 +151,6 @@ [submodule "orgit"] path = orgit url = https://github.com/magit/orgit.git +[submodule "git-auto-commit-mode"] + path = git-auto-commit-mode + url = https://github.com/ryuslash/git-auto-commit-mode.git diff --git a/git-auto-commit-mode b/git-auto-commit-mode new file mode 160000 index 0000000..a7b59ac --- /dev/null +++ b/git-auto-commit-mode @@ -0,0 +1 @@ +Subproject commit a7b59acea622a737d23c783ce7d212fefb29f7e6 diff --git a/global.org b/global.org index f090754..04b4ced 100644 --- a/global.org +++ b/global.org @@ -1140,7 +1140,8 @@ "~/org/orgzly/hack.org" "~/org/orgzly/library.org" "~/org/kaizen.org" - "~/org/orgzly/refile.org")) + "~/org/orgzly/refile.org" + "~/clones/orgzly/refile-git.org")) #+end_src Use less verbose reminders: #+begin_src emacs-lisp @@ -1614,6 +1615,9 @@ overwrite your changes." (interactive) (message "Reverting Orgzly buffers…") + ; pull from remote + (let ((default-directory "~/clones/orgzly")) + (or (eq 0 (shell-command "git pull origin master")) (call-interactively #'magit-status))) (save-excursion (save-window-excursion (dolist (b (buffer-list)) @@ -1622,9 +1626,15 @@ (with-current-buffer b (string-match-p "orgzly" default-directory))) (pop-to-buffer-same-window b) (revert-buffer t 'no-confirm))))) + (org-agenda-redo-all)) (define-key org-agenda-mode-map (kbd "Z") 'org-revert-all-orgzly-buffers) #+end_src + Use gac + #+begin_src emacs-lisp + (require 'git-auto-commit-mode) + (setq gac-automatically-push-p t) + #+end_src *** Hydras for timestamps #+begin_src emacs-lisp (defun hydra-timestamp/hl-paren-force-fix ()