From f634ad6203c1469ccf05a6762b6154d9131dbc04 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 12 Mar 2024 00:57:19 +0000 Subject: jao-org-notes nits --- lib/doc/jao-org-notes.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- cgit v1.2.3