Ensure journal file header is present before invoking capture

master
trémeur 9 months ago
parent b45ed7449e
commit a170641b0c

@ -5,6 +5,7 @@
(defun findread () (defun findread ()
"Find or create heading for read books" "Find or create heading for read books"
(filedate)
(goto-char (point-min)) (goto-char (point-min))
(if (not (search-forward "** read" nil t)) (if (not (search-forward "** read" nil t))
(if (not (search-forward "* books" nil t)) (if (not (search-forward "* books" nil t))
@ -15,6 +16,7 @@
(defun findacquired () (defun findacquired ()
"Find or create heading for acquired books" "Find or create heading for acquired books"
(filedate)
(goto-char (point-min)) (goto-char (point-min))
(if (not (search-forward "** acquired" nil t)) (if (not (search-forward "** acquired" nil t))
(if (not (search-forward "* books" nil t)) (if (not (search-forward "* books" nil t))
@ -25,6 +27,7 @@
(defun findwatched () (defun findwatched ()
"Find or create heading for watched films" "Find or create heading for watched films"
(filedate)
(goto-char (point-min)) (goto-char (point-min))
(if (not (search-forward "** watched" nil t)) (if (not (search-forward "** watched" nil t))
(if (not (search-forward "* films" nil t)) (if (not (search-forward "* films" nil t))
@ -35,6 +38,7 @@
(defun findvisited () (defun findvisited ()
"Find or create heading for visited places" "Find or create heading for visited places"
(filedate)
(goto-char (point-min)) (goto-char (point-min))
(if (not (search-forward "** visited" nil t)) (if (not (search-forward "** visited" nil t))
(if (not (search-forward "* places" nil t)) (if (not (search-forward "* places" nil t))
@ -45,6 +49,7 @@
(defun finddw () (defun finddw ()
"Find or create heading for DW posts" "Find or create heading for DW posts"
(filedate)
(goto-char (point-min)) (goto-char (point-min))
(if (not (search-forward "* dw" nil t)) (if (not (search-forward "* dw" nil t))
(progn (progn

Loading…
Cancel
Save