diff options
author | Spencer Williams <spnw@plexwave.org> | 2025-04-08 11:02:09 -0400 |
---|---|---|
committer | Spencer Williams <spnw@plexwave.org> | 2025-04-08 11:02:09 -0400 |
commit | fa6aed3f1669d446aca399dcbf396eac76c82eff (patch) | |
tree | 8c4d5ddb0f074e2c15b55b092c1314efd1cc884a /lisp/seam.el | |
parent | 34a219da26808fdde4babed986a66543af878d22 (diff) |
Fix bug that allows notes to be created with empty slug
Diffstat (limited to 'lisp/seam.el')
-rw-r--r-- | lisp/seam.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/seam.el b/lisp/seam.el index 589e947..9186be9 100644 --- a/lisp/seam.el +++ b/lisp/seam.el @@ -196,6 +196,8 @@ naming. Must be a function taking two arguments: TITLE and TYPE." (file (file-name-concat seam-note-directory type (concat slug ".org")))) + (when (string= "" slug) + (error "Cannot create a note with an empty slug")) (seam--check-conflict slug) (let ((buffer (funcall (if select #'find-file #'find-file-noselect) file))) (with-current-buffer buffer |