branch: elpa/org-superstar
commit f14dd4dc8bd20b368a2663b5a69b2944e4124c81
Author: D. Williams <[email protected]>
Commit: D. Williams <[email protected]>
Fixed logic errors I introduced with last merge.
---
org-superstar.el | 22 ++++++++++++++--------
tests/sample.org | 2 ++
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/org-superstar.el b/org-superstar.el
index 60fdf5ee47..e52dd33e0e 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -517,20 +517,26 @@ symbol ‘default’, return it instead. Otherwise, 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."
- (when-let* ((todo-kw
- (org-superstar--get-todo (match-beginning 0)))
- (todo-bullet
- (cdr (org-superstar--todo-assoc todo-kw))))
+the current keyword, return nil.
+
+If ‘org-superstar-special-todo-items’ is set to the symbol
+‘hide’, return that instead."
+ (let* ((todo-kw
+ (org-superstar--get-todo (match-beginning 0)))
+ (todo-bullet
+ (cdr (org-superstar--todo-assoc todo-kw))))
(cond
- ((and todo-kw (eq org-superstar-special-todo-items 'hide))
+ ((not todo-kw)
+ nil)
+ ((eq org-superstar-special-todo-items 'hide)
'hide)
((characterp todo-bullet)
todo-bullet)
((listp todo-bullet)
- (let ((todo-fallback (cadr todo-bullet))
- (todo-bullet (car todo-bullet)))
+ (when-let ((todo-fallback (cadr todo-bullet))
+ (todo-bullet (car todo-bullet)))
(if (org-superstar-graphic-p)
todo-bullet
todo-fallback))))))
diff --git a/tests/sample.org b/tests/sample.org
index becca23866..7824d8c050 100644
--- a/tests/sample.org
+++ b/tests/sample.org
@@ -1,5 +1,6 @@
#+TITLE:Sample File
#+STARTUP: showeverything
+#+TODO: TODO IN-PROGRESS | DONE
* Lorem ipsum dolor sit amet
** Consectetur adipiscing elit
*** Eiusmod tempor incididunt
@@ -24,6 +25,7 @@
***** TODO A
***** DONE B
+***** IN-PROGRESS C
*************** Inline task?
**************** second