feat(emacs): add org-log command
This commit is contained in:
parent
86ef74cba8
commit
a553794083
1 changed files with 13 additions and 1 deletions
|
|
@ -11,7 +11,8 @@
|
||||||
"i" #'org-roam-node-insert
|
"i" #'org-roam-node-insert
|
||||||
"t" #'org-roam-tag-add
|
"t" #'org-roam-tag-add
|
||||||
"s" #'org-save-all-org-buffers
|
"s" #'org-save-all-org-buffers
|
||||||
"w" #'org-switch-workspace)
|
"w" #'org-switch-workspace
|
||||||
|
"l" #'org-log)
|
||||||
|
|
||||||
(defun org-switch-workspace (&optional workspace-name)
|
(defun org-switch-workspace (&optional workspace-name)
|
||||||
"Switch the current org-roam-directory to WORKSPACE-NAME."
|
"Switch the current org-roam-directory to WORKSPACE-NAME."
|
||||||
|
|
@ -29,6 +30,17 @@
|
||||||
(setq org-roam-db-location (cddr (assoc workspace-name org-workspaces-alist)))
|
(setq org-roam-db-location (cddr (assoc workspace-name org-workspaces-alist)))
|
||||||
(org-roam-db-sync nil)))
|
(org-roam-db-sync nil)))
|
||||||
|
|
||||||
|
(defun org-log ()
|
||||||
|
"Add a new entry to the log."
|
||||||
|
(interactive)
|
||||||
|
(let* ((log-file-id "77f70d99-0674-43fb-8d64-f04cfa6cb495")
|
||||||
|
(log-file (org-roam-node-from-id log-file-id)))
|
||||||
|
(org-roam-node-visit log-file)
|
||||||
|
(beginning-of-buffer)
|
||||||
|
(org-next-visible-heading 1)
|
||||||
|
(org-insert-heading)
|
||||||
|
(org-timestamp '(16))))
|
||||||
|
|
||||||
(defun org-roam-migrate ()
|
(defun org-roam-migrate ()
|
||||||
"Migrate a regular org file into an org-roam file in my format."
|
"Migrate a regular org file into an org-roam file in my format."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue