From 7024463ca8513ec56dc6e7bbe70d96b4eb601cb9 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 4 Sep 2022 05:44:14 +0100 Subject: jao-org-notes: fix for tags insertion command --- lib/doc/jao-org-notes.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/doc') diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el index 62ee1ef..3f3c5ea 100644 --- a/lib/doc/jao-org-notes.el +++ b/lib/doc/jao-org-notes.el @@ -38,7 +38,7 @@ (cons (format "%s %s" (replace-regexp-in-string "^\\./" "" (car m)) (replace-regexp-in-string "[0-9]+:#\\+\\(title\\|tags\\):" - " (\\2)" (cadr m))) + " (\\1)" (cadr m))) (expand-file-name (car m) default-directory))) (defun jao-org-notes--matches (lines) @@ -120,9 +120,8 @@ (insert "\n")) (defun jao-org-notes--template (k) - `(,k "Note" plain (file jao-org-notes-open-or-create) - "\n- %a\n %i" - :jump-to-captured t)) + `(,k "Note" plain (file jao-org-notes-create) + "\n- %a\n %i" :jump-to-captured t)) ;;;###autoload (defun jao-org-notes-open () @@ -132,8 +131,8 @@ (find-file f))) ;;;###autoload -(defun jao-org-notes-open-or-create () - "Open or create a new note file, matching tags and titles with completion." +(defun jao-org-notes-create () + "Create a new note file, matching tags and titles with completion." (interactive) (when (jao-org-notes--insert-title) (jao-org-notes--insert-date) @@ -159,7 +158,7 @@ (defun jao-org-notes-insert-tags () "Insert a list of tags at point, with completing read." (interactive) - (insert (mapconcat 'identity (jao-org-notes--read-tags) " "))) + (insert ":" (mapconcat 'identity (jao-org-notes--read-tags) ":") ":")) ;;;###autoload (defun jao-org-notes-insert-link () -- cgit v1.2.3