summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-03-12 00:57:19 +0000
committerjao <jao@gnu.org>2024-03-12 00:58:26 +0000
commitf634ad6203c1469ccf05a6762b6154d9131dbc04 (patch)
tree000bc71adc1a57575b6d796f93c0ebba49d03f92
parent58b549e729ede1017726c6efc0d94ae2a97a28e8 (diff)
downloadelibs-f634ad6203c1469ccf05a6762b6154d9131dbc04.tar.gz
elibs-f634ad6203c1469ccf05a6762b6154d9131dbc04.tar.bz2
jao-org-notes nits
-rw-r--r--lib/doc/jao-org-notes.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el
index af54422..916a4c8 100644
--- a/lib/doc/jao-org-notes.el
+++ b/lib/doc/jao-org-notes.el
@@ -94,6 +94,7 @@
(title (replace-regexp-in-string "^#" "" title)))
(when (not (string-empty-p title))
(let* ((base (replace-regexp-in-string " +" "-" (downcase title)))
+ (base (replace-regexp-in-string "[^-[:alnum:][:digit:]]" "" base))
(fname (expand-file-name (concat cat "/" base ".org")
jao-org-notes-dir))
(exists? (file-exists-p fname)))
@@ -115,7 +116,8 @@
tags))
(defun jao-org-notes--template (k)
- `(,k "Note" plain (file jao-org-notes-create) "\n- %a\n %i"))
+ `(,k "Note" plain (file jao-org-notes-create)
+ "%(if %:url \"#+link: %:url\" \"\")\n\n- %a\n %i"))
(defun jao-org-notes-all-tags ()
(let ((tags nil))