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

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

[nongnu] elpa/org-superstar 3efb5f76cb 146/162: Allow hiding leading bul


From: Stefan Kangas
Subject: [nongnu] elpa/org-superstar 3efb5f76cb 146/162: Allow hiding leading bullet for all todo keywords
Date: Fri, 31 Dec 2021 19:35:39 -0500 (EST)

branch: elpa/org-superstar
commit 3efb5f76cb9f45c54ed7e72a06b7138bb7b89e80
Author: Anders Johansson <mejlaandersj@gmail.com>
Commit: Anders Johansson <mejlaandersj@gmail.com>

    Allow hiding leading bullet for all todo keywords
    
    The previous implementation only hid the bullet for todo keywords that were
    mapped to a bullet in org-superstar-todo-bullet-alist.
---
 org-superstar.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/org-superstar.el b/org-superstar.el
index 8f661af836..0f1eaeea88 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -490,8 +490,11 @@ If no TODO property is found, return nil."
 
 (defun org-superstar--todo-bullet ()
   "Return the desired TODO item bullet, if defined.
-If no entry can be found in ‘org-superstar-todo-bullet-alist’ for
-the current keyword, return nil."
+
+If we have are in a TODO entry and
+‘org-superstar-special-todo-items’ is hide return hide. Else, if no
+entry can be found in ‘org-superstar-todo-bullet-alist’ for the
+current keyword, return nil."
   (let* ((todo-kw
           (org-superstar--get-todo (match-beginning 0)))
          (todo-bullet
@@ -500,6 +503,8 @@ the current keyword, return nil."
          (todo-bullet (cdr todo-bullet))
          (todo-fallback nil))
     (cond
+     ((and todo-kw (eq org-superstar-special-todo-items 'hide))
+      'hide)
      ((characterp todo-bullet)
       todo-bullet)
      ((listp todo-bullet)
@@ -535,7 +540,7 @@ See also ‘org-superstar-cycle-headline-bullets’."
         (todo-bullet (when org-superstar-special-todo-items
                        (org-superstar--todo-bullet))))
     (cond (todo-bullet
-           (unless (eq org-superstar-special-todo-items 'hide)
+           (unless (eq todo-bullet 'hide)
              todo-bullet))
           ((integerp max-bullets)
            (org-superstar--nth-headline-bullet (% n max-bullets)))



reply via email to

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