summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-11-28 13:12:09 +0000
committerjao <jao@gnu.org>2025-11-28 13:12:09 +0000
commit6582785a4004fe68c79219c690aaafdc8ec5a240 (patch)
tree6b685b4688314f0b6c2f49b7e4dd640656fe1d06
parent1b0e0ce333bae2d3befa2d15551dd2cd77b3dc3c (diff)
downloadelibs-6582785a4004fe68c79219c690aaafdc8ec5a240.tar.gz
elibs-6582785a4004fe68c79219c690aaafdc8ec5a240.tar.bz2
jao-org-notes: capture templates with notes file fixed
-rw-r--r--custom/jao-custom-eww.el2
-rw-r--r--lib/doc/jao-org-notes.el4
2 files changed, 3 insertions, 3 deletions
diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el
index 30dbdf9..6f64cd3 100644
--- a/custom/jao-custom-eww.el
+++ b/custom/jao-custom-eww.el
@@ -129,7 +129,7 @@
(end (if (org-region-active-p) (region-end) (point-max)))
(link (eww-current-url))
(title (plist-get eww-data :title))
- (buff (save-current-buffer (or dest (jao-org-notes-create title)))))
+ (buff (save-current-buffer (or dest (jao-org-notes-create title t)))))
(with-current-buffer buff
(insert "#+link: " link "\n\n")
(org-mode))
diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el
index 4b45eab..0b2c65b 100644
--- a/lib/doc/jao-org-notes.el
+++ b/lib/doc/jao-org-notes.el
@@ -188,7 +188,7 @@ appear in any order in the tags list.
(init (concat "^..tags: " (mapconcat #'identity tags " "))))
(jao-org-notes-consult-ripgrep init)))
-(defun jao-org-notes-create (&optional title)
+(defun jao-org-notes-create (&optional title ret-buffer)
"Create a new note file, matching tags and titles with completion."
(interactive)
(when (jao-org-notes--insert-title title)
@@ -197,7 +197,7 @@ appear in any order in the tags list.
":\n")
(org-insert-time-stamp (current-time) t t "#+date: " "\n"))
(save-buffer)
- (current-buffer))
+ (if ret-buffer (current-buffer) (buffer-file-name)))
(defun jao-org-notes-backlinks ()
"Show a list of note files linking to the current one."