diff options
author | Thanos Apollo <[email protected]> | 2024-03-19 14:07:53 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-03-19 14:07:53 +0200 |
commit | 480d4f99295a003053e59f42e847d7f54f2c5729 (patch) | |
tree | e830d3dbab3956c3fea9962d3cb920a2a0b72a66 | |
parent | 8b28bd024d603a851160c090e6f403915b5e7e07 (diff) |
thanos-commands: Add thanos/sync-notes
-rw-r--r-- | .emacs.d/modules/thanos-commands.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/.emacs.d/modules/thanos-commands.el b/.emacs.d/modules/thanos-commands.el index f4220c3..beb474b 100644 --- a/.emacs.d/modules/thanos-commands.el +++ b/.emacs.d/modules/thanos-commands.el @@ -257,7 +257,18 @@ (let ((input-method (nth thanos/input-methods-index thanos/input-methods))) (set-input-method (if (string= "nil" input-method) nil input-method)))) -;; (define-key global-map (kbd "C-\\") #'thanos/toggle-input-method) +(defun thanos/sync-notes () + "Sync org-oram notes" + (interactive) + (let ((git (executable-find "git")) + (default-directory org-roam-directory)) + (message "Synching org-roam notes %s" org-roam-directory) + (unless git + (error "Git not found, please install git")) + (unless (file-exists-p (expand-file-name ".git" gnosis-dir)) + (message "Creating git repository") + (vc-create-repo 'Git)) + (vc-git-push nil))) (provide 'thanos-commands) ;;; thanos-commands.el ends here |