emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/logos 1cf1173f0a 3/4: Explain how to target specific Or


From: ELPA Syncer
Subject: [elpa] externals/logos 1cf1173f0a 3/4: Explain how to target specific Org heading levels
Date: Sun, 13 Mar 2022 03:57:40 -0400 (EDT)

branch: externals/logos
commit 1cf1173f0a259ec5be0c8328839c9a9b2fc16ae5
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Explain how to target specific Org heading levels
---
 README.org | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/README.org b/README.org
index 4918d8798b..cb2cbe83a9 100644
--- a/README.org
+++ b/README.org
@@ -391,6 +391,20 @@ pattern).  Putting it all together:
         (t . ,(or outline-regexp logos--page-delimiter))))
 #+end_src
 
+Another Org-specific tweak is to use heading levels up to a specific
+number.  The idea would be that anything below that number is not
+significant.  For example, =^\\* += only applies to top-level headings,
+while =^\\*\\{1,3\\} += covers heading levels 1 through 3.  Accounting
+for the aforementiond horizontal rle and generic page delimiter, the end
+result can look like this:
+
+#+begin_src emacs-lisp
+(setq logos-outline-regexp-alist
+      `((emacs-lisp-mode . ,(format "\\(^;;;+ \\|%s\\)" logos--page-delimiter))
+        (org-mode . ,(format "\\(^\\*\\{1,3\\} +\\|^-\\{5\\}$\\|%s\\)" 
logos--page-delimiter))
+        (t . ,(or outline-regexp logos--page-delimiter))))
+#+end_src
+
 * GNU Free Documentation License
 :PROPERTIES:
 :APPENDIX: t



reply via email to

[Prev in Thread] Current Thread [Next in Thread]