diff options
author | Thanos Apollo <[email protected]> | 2024-04-03 05:07:17 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-04-03 05:07:17 +0300 |
commit | c10dea1ec1faa15ab27d0c9a685aed8098fbb520 (patch) | |
tree | 7cf65456015d9cbba4aebcf9513ae9b8a6dbfeea | |
parent | d16e4ed7619e435d656bc7bf305a51d18ed96457 (diff) |
emacs:(org-raom) Add dailies keybindings & org-roam-sync-notes
-rw-r--r-- | .emacs.d/init.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index a0d32f0..3e7008c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -245,11 +245,30 @@ ("p" "MUS" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: MUS") :unnarrowed t))) + + (defun org-roam-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)) + (shell-command "git pull") + (shell-command (format "%s %s" git "add .")) + (shell-command (format "%s %s %s" git "commit -m" (shell-quote-argument "Update org-roam notes"))) + (vc-git-push nil)) + (funcall 'org-roam-db-sync)) :bind (("C-c n" . thanos/notes-map) :map thanos/notes-map ("t" . org-roam-buffer-toggle) ("f" . org-roam-node-find) ("i" . org-roam-node-insert) + ("d" . org-roam-dailies-goto-today) + ("D" . org-roam-dailies-goto-date) :map org-mode-map ("C-c C-." . org-roam-tag-add) ("C-c i" . org-id-get-create))) |