summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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))