From be52929cf5f87e63417e18e313b9f43273a46eb3 Mon Sep 17 00:00:00 2001 From: Blendoit Date: Tue, 3 Nov 2020 18:46:14 -0800 Subject: Org mode header line. --- smart-documents.org | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'smart-documents.org') 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 -- cgit v1.2.3