aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-11-02 22:27:58 -0500
committerBardofSprites <[email protected]>2025-11-02 22:27:58 -0500
commit3230bc7f16e9b070400768f9139e7934332e6141 (patch)
treec78aa3fc5aa7c2761011a6a3d7142b46f0c0bc35
parent3fd0db9cfef810de8874e449f342b6b1afce0e7f (diff)
denote journal modifications
-rw-r--r--bard-elisp/bard-writing.el14
-rw-r--r--bard-emacs-modules/bard-emacs-writing.el23
2 files changed, 30 insertions, 7 deletions
diff --git a/bard-elisp/bard-writing.el b/bard-elisp/bard-writing.el
index cc99384..e1e4048 100644
--- a/bard-elisp/bard-writing.el
+++ b/bard-elisp/bard-writing.el
@@ -54,6 +54,16 @@
(insert (format ":PROPERTIES:\n:ID: %s\n:END:\n" id)))
(save-buffer))
+(defun bard/denote-maybe-insert-id ()
+ "Insert a top-level :ID: unless this is a denote journal file."
+ (interactive)
+ (let ((file (buffer-file-name)))
+ (unless (and file
+ (boundp 'denote-journal-directory)
+ (string-prefix-p (expand-file-name denote-journal-directory)
+ (expand-file-name file)))
+ (bard/denote-insert-id-at-top))))
+
(defun denote-sequence-region ()
"Call `denote-sequence' and insert therein the text of the active region.
@@ -154,5 +164,9 @@ saved or killed at the end of `denote-sequence-region'."
(global-set-key (kbd "C-c u") #'bard/jump-to-class)
(global-set-key (kbd "C-c U") #'bard/jump-to-class-new-frame)
+(defun bard/denote-todo-template ()
+ "Return string for daily tasks heading in `denote-journal' entries"
+ (format "* Tasks for %s\n\n* Notes for today"
+ (format-time-string "%Y-%m-%d (%a)")))
(provide 'bard-writing)
diff --git a/bard-emacs-modules/bard-emacs-writing.el b/bard-emacs-modules/bard-emacs-writing.el
index 0f7a3ad..1461a29 100644
--- a/bard-emacs-modules/bard-emacs-writing.el
+++ b/bard-emacs-modules/bard-emacs-writing.el
@@ -59,10 +59,10 @@
(use-package denote
:ensure t
:config
+ (require 'bard-writing)
(setq denote-directory "~/Notes/denote/")
- (setq denote-journal-extras-directory "~/Notes/journal")
- (setq denote-rename-buffer-format "%s %t"
- denote-buffer-name-prefix "[Note] ")
+ (setq denote-buffer-name-prefix "[Note] "
+ denote-rename-buffer-format "%t %b")
(setq denote-known-keywords
'("emacs"
"linux"
@@ -73,10 +73,10 @@
"history"
"biology"
))
+
(setq denote-templates
'((default . "Related to — ")
- (physics . "* Introduction\n** Hypothesis\n** Materials\n* Procedure\n* Data\n* Conclusion")
- (writing . "* Prompt\n* Outline\n* Response")))
+ (todo . bard/denote-todo-template)))
(setq denote-save-buffers t)
(setq denote-prompts '(title keywords))
@@ -96,7 +96,7 @@
(require 'bard-writing)
- (add-hook 'denote-after-new-note-hook #'bard/denote-insert-id-at-top)
+ (add-hook 'denote-after-new-note-hook #'bard/denote-maybe-insert-id)
:hook
(dired-mode . denote-dired-mode)
@@ -107,7 +107,6 @@
("C-c n d" . denote-sort-dired)
("C-c n r" . denote-rename-file-using-front-matter)
("C-c n k" . denote-rename-file-keywords)
- ("C-c n i" . denote-link)
("C-c n I" . denote-add-links)
("C-c n b" . bard/consult-buffer-notes) ; notes buffer
("C-c n B" . bard/ibuffer-notes) ; notes buffer but more
@@ -136,6 +135,16 @@
("C-c n D" . denote-sequence-dired)
("C-c n <SPC>" . denote-sequence-region))
+(use-package denote-journal
+ :ensure t
+ :bind
+ ("C-c n j" . denote-journal-new-or-existing-entry)
+ :config
+ (setq denote-journal-directory "~/Notes/denote/journal/")
+
+ (setq denote-journal-title-format "Daily Tasks and Notes")
+ )
+
(use-package org-roam
:ensure t
:custom