From fa6aed3f1669d446aca399dcbf396eac76c82eff Mon Sep 17 00:00:00 2001 From: Spencer Williams Date: Tue, 8 Apr 2025 11:02:09 -0400 Subject: Fix bug that allows notes to be created with empty slug --- lisp/seam.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/seam.el') 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 -- cgit v1.2.3