commit 46d962ab186b4d3824198a54d05021fecd54f4f1
parent d01692a12f5e38bd7cced93d2f91f6d4d57683c7
Author: Spencer Williams <spnw@plexwave.org>
Date: Wed, 16 Apr 2025 14:19:02 -0400
Fix improper error masking in regexp search
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lisp/seam.el b/lisp/seam.el
@@ -156,8 +156,7 @@ naming. Must be a function taking two arguments: TITLE and TYPE."
(save-restriction
(widen)
(goto-char 1)
- (ignore-errors
- (re-search-forward "^\\* ")
+ (when (re-search-forward "^\\* " nil t)
(let ((start (point)))
(end-of-line)
(let ((title (string-trim (buffer-substring-no-properties start (point)))))
@@ -175,8 +174,7 @@ naming. Must be a function taking two arguments: TITLE and TYPE."
(save-restriction
(widen)
(goto-char 1)
- (ignore-errors
- (re-search-forward "^\\* ")
+ (when (re-search-forward "^\\* " nil t)
(org-element-property :SEAM_SLUG (org-element-at-point))))))
(seam-slugify (seam-get-title-from-buffer buffer))))