(defun get-option (tag) (let ((old-pos (point))) (goto-char 0) (goto-char (search-forward tag)) (beginning-of-line) (org-element-property :value (org-element-at-point)))) (let ((title (get-option "#+TITLE:")) (author (get-option "#+AUTHOR:"))) (setq-local header-line-format (book-mode--header :prefix #'book-mode-element-frame-count-icon :left (propertize title 'face 'nano-strong) :right author :suffix #'book-mode-element-dedicated)))