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

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

[elpa] externals/org-modern f45be59ff5 46/65: org-modern-keyword: Config


From: ELPA Syncer
Subject: [elpa] externals/org-modern f45be59ff5 46/65: org-modern-keyword: Configurable replacement
Date: Mon, 7 Mar 2022 12:57:47 -0500 (EST)

branch: externals/org-modern
commit f45be59ff5f754a2638399254cd7be37c02fb933
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    org-modern-keyword: Configurable replacement
    
    Suggestion by @astoff
---
 org-modern.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index 85812c033c..766228d0f1 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -136,8 +136,11 @@ Set to nil to disable styling checkboxes."
   :type 'boolean)
 
 (defcustom org-modern-keyword t
-  "Prettify keywords like #+title."
-  :type 'boolean)
+  "Prettify keywords like #+title.
+If set to a string, e.g., \"‣\", the string is used as replacement for #+."
+  :type '(choice (boolean :tag "Hide keyword prefix")
+                 (string :tag "Custom replacement")
+                 (const :tag "Triangle bullet" "‣")))
 
 (defcustom org-modern-statistics t
   "Prettify todo statistics."
@@ -456,7 +459,11 @@ Set to nil to disable the indicator."
       (when org-modern-todo
         `((,(format "^\\*+ +%s " (regexp-opt org-todo-keywords-1 t)) (0 
(org-modern--todo)))))
       (when org-modern-keyword
-        `(("^[ \t]*\\(#\\+\\)\\S-" 1 '(face nil invisible t))))
+        `(("^[ \t]*\\(#\\+\\)\\S-" 1
+           '(face nil
+                  ,@(if (stringp org-modern-keyword)
+                       `(display ,org-modern-keyword)
+                     '(invisible t))))))
       (when org-modern-checkbox
         '(("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(\\[[ X-]\\]\\)[ \t]"
            (0 (org-modern--checkbox)))))



reply via email to

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