diff options
author | jao <jao@gnu.org> | 2022-09-04 05:44:14 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-04 05:44:14 +0100 |
commit | 7024463ca8513ec56dc6e7bbe70d96b4eb601cb9 (patch) | |
tree | d7940934a7a858dc68d8c053bb66eb780fa999e7 | |
parent | b898efed72f7b7e47c94be3a99264393d5bc4364 (diff) | |
download | elibs-7024463ca8513ec56dc6e7bbe70d96b4eb601cb9.tar.gz elibs-7024463ca8513ec56dc6e7bbe70d96b4eb601cb9.tar.bz2 |
jao-org-notes: fix for tags insertion command
-rw-r--r-- | init.el | 9 | ||||
-rw-r--r-- | lib/doc/jao-org-notes.el | 13 |
2 files changed, 11 insertions, 11 deletions
@@ -3337,10 +3337,11 @@ (transient-define-prefix jao-transient-utils () "Global operations." [["Notes" - ("n" "create or open" jao-org-notes-open-or-create) - ("/" "search notes" jao-recoll-consult-notes) - ("d" "go to doc" jao-select-pdf) - ("D" "open to doc" jao-open-doc)] + ("n" "create new note" jao-org-notes-create) + ("/" "open note" jao-org-notes-open) + ("d" "go to doc" jao-select-pdf :if display-graphic-p) + ("d" "search docs" jao-recoll-consult-docs :if-not display-graphic-p) + ("D" "open doc" jao-open-doc)] ["Monitors" ("p" "htop" jao-term-htop) ("v" "vpn status" jao-mullvad-status) 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 () |