branch: externals/denote-review
commit 1a93a32190e35731ba12e7ecde629e2971e870db
Author: Matto Fransen <[email protected]>
Commit: Matto Fransen <[email protected]>
more robust insert reviewdate
---
denote-review.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/denote-review.el b/denote-review.el
index a856974d2c..d3e8302648 100644
--- a/denote-review.el
+++ b/denote-review.el
@@ -5,7 +5,7 @@
;; Author: Matto Fransen <[email protected]>
;; Maintainer: Matto Fransen <[email protected]>
;; Url: https://codeberg.org/mattof/denote-review
-;; Version: 1.0.4
+;; Version: 1.0.5
;; Keywords: files
;; Package-Requires: ((emacs "28.1") (denote "4.1.3"))
@@ -98,7 +98,9 @@ Or use THISDATE, when not nil.
INSERT-REGEXP is regepx to search for appropriate insert location."
(goto-char (point-min))
(let ((date (or thisdate (format-time-string "%F"))))
- (re-search-forward insert-regexp nil t)
+ (unless
+ (re-search-forward insert-regexp nil t)
+ (error (format "Frontmatter \"%s\" not found"
denote-review-insert-after)))
(goto-char (line-end-position))
(insert "\n" (denote-review-insert-reviewdate-line date))))