diff options
author | jao <jao@gnu.org> | 2024-03-12 00:57:19 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2024-03-12 00:58:26 +0000 |
commit | f634ad6203c1469ccf05a6762b6154d9131dbc04 (patch) | |
tree | 000bc71adc1a57575b6d796f93c0ebba49d03f92 /lib/doc/jao-org-notes.el | |
parent | 58b549e729ede1017726c6efc0d94ae2a97a28e8 (diff) | |
download | elibs-f634ad6203c1469ccf05a6762b6154d9131dbc04.tar.gz elibs-f634ad6203c1469ccf05a6762b6154d9131dbc04.tar.bz2 |
jao-org-notes nits
Diffstat (limited to 'lib/doc/jao-org-notes.el')
-rw-r--r-- | lib/doc/jao-org-notes.el | 4 |
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)) |