summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--smart-documents.org13
1 files changed, 10 insertions, 3 deletions
diff --git a/smart-documents.org b/smart-documents.org
index 12e756d..e5fabc8 100644
--- a/smart-documents.org
+++ b/smart-documents.org
@@ -1087,13 +1087,20 @@ This is pretty much a gutted out powerline.
**** Header line
-#+BEGIN_SRC emacs-lisp
- (setq header-line-format "%b")
+#+BEGIN_SRC emacs-lisp :tangle yes
+(add-hook org-mode-hook
+ '(lambda ()
+ "Set the header line to show org document title."
+ (setq header-line-format
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward "^[[:space:]]*#\\+TITLE:[[:space:]]*\\(.*?\\)[[:space:]]*$" nil t)
+ (match-string 1))))
#+END_SRC
**** Mode line
-#+BEGIN_SRC emacs-lisp
+#+BEGIN_SRC emacs-lisp :tangle yes
(setq mode-line-format nil)
#+END_SRC
Copyright 2019--2024 Marius PETER