summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el9
-rw-r--r--lib/doc/jao-org-notes.el13
2 files changed, 11 insertions, 11 deletions
diff --git a/init.el b/init.el
index 603788b..9d0e908 100644
--- a/init.el
+++ b/init.el
@@ -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 ()