summaryrefslogtreecommitdiff
path: root/smart-documents.org
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-11-03 18:46:14 -0800
committerBlendoit <blendoit@gmail.com>2020-11-03 18:46:14 -0800
commitbe52929cf5f87e63417e18e313b9f43273a46eb3 (patch)
tree88ae4404d372b99d3d9a3d0b047d50028f280e7c /smart-documents.org
parentffec5f58046d54357fbfa034b0657ac6cede45c4 (diff)
Org mode header line.
Diffstat (limited to 'smart-documents.org')
-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