From a553794083a167571e540dbb006b06fc60eea5c4 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Wed, 15 Oct 2025 22:37:20 -0500 Subject: [PATCH] feat(emacs): add `org-log` command --- .emacs.d/include/priime-org.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.emacs.d/include/priime-org.el b/.emacs.d/include/priime-org.el index 2fd93d3..858d5df 100644 --- a/.emacs.d/include/priime-org.el +++ b/.emacs.d/include/priime-org.el @@ -11,7 +11,8 @@ "i" #'org-roam-node-insert "t" #'org-roam-tag-add "s" #'org-save-all-org-buffers - "w" #'org-switch-workspace) + "w" #'org-switch-workspace + "l" #'org-log) (defun org-switch-workspace (&optional 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))) (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 () "Migrate a regular org file into an org-roam file in my format." (interactive)