diff options
author | Spencer Williams <spnw@plexwave.org> | 2025-04-16 14:19:02 -0400 |
---|---|---|
committer | Spencer Williams <spnw@plexwave.org> | 2025-04-16 14:19:02 -0400 |
commit | 46d962ab186b4d3824198a54d05021fecd54f4f1 (patch) | |
tree | 000381af25fa3ae7d9bb5bd5a5334337b0141408 /lisp/seam.el | |
parent | d01692a12f5e38bd7cced93d2f91f6d4d57683c7 (diff) |
Fix improper error masking in regexp search
Diffstat (limited to 'lisp/seam.el')
-rw-r--r-- | lisp/seam.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/seam.el b/lisp/seam.el index 201bbdf..cd2ddbb 100644 --- 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)))) |