[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-superstar 66e593a8b7 102/162: Support advanced composi
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/org-superstar 66e593a8b7 102/162: Support advanced composition for TODO item bullets. |
Date: |
Fri, 31 Dec 2021 19:35:31 -0500 (EST) |
branch: elpa/org-superstar
commit 66e593a8b7a29c94afb1373e2fa87359c69053cc
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>
Support advanced composition for TODO item bullets.
This should implement everything necessary to allow advanced
composition for TODO items. The code compiles, but requires further
debugging. See Issue #9.
---
org-superstar.el | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/org-superstar.el b/org-superstar.el
index 935249605b..c3e2c3d228 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -129,8 +129,16 @@ You should call ‘org-superstar-restart’ after changing this
variable for your changes to take effect."
:group 'org-superstar
:type '(alist :key-type (string :format "TODO keyword: %v")
- :value-type (character :value ?◉
- :format "Bullet character: %v\n")))
+ :value-type
+ (choice
+ (character :value ?◉
+ :format "Bullet character: %v\n"
+ :tag "Simple bullet character")
+ (list :tag "Advanced string and fallback"
+ (string :value "◉"
+ :format "String of characters to compose: %v")
+ (character :value ?◉
+ :format "Fallback character for terminal:
%v\n")))))
;;;###autoload
(put 'org-superstar-leading-bullet
@@ -382,9 +390,22 @@ If no TODO property is found, return nil."
"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."
- (cdr (assoc-string
- (org-superstar--get-todo (match-beginning 0))
- org-superstar-todo-bullet-alist)))
+ (let* ((todo-kw
+ (org-superstar--get-todo (match-beginning 0)))
+ (todo-bullet
+ (assoc-string todo-kw
+ org-superstar-todo-bullet-alist))
+ (todo-bullet (cdr todo-bullet))
+ (todo-fallback nil))
+ (cond
+ ((characterp todo-bullet)
+ todo-bullet)
+ ((listp todo-bullet)
+ (setq todo-fallback (cadr todo-bullet))
+ (setq todo-bullet (car todo-bullet))
+ (if (org-superstar-graphic-p)
+ todo-bullet
+ todo-fallback)))))
(defun org-superstar--hbullets-length ()
"Return the length of ‘org-superstar-headline-bullets-list’."
- [nongnu] elpa/org-superstar 7e763a5466 131/162: Merge branch 'master' into volatile, (continued)
- [nongnu] elpa/org-superstar 7e763a5466 131/162: Merge branch 'master' into volatile, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 72cc899d87 130/162: Updating sample file, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 3935ecf7b4 137/162: Add example files for Issue #21, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 84362aeccb 140/162: Updating README to promote new template repo., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 046f845dfe 142/162: Add TODO test case., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar d2abbbb714 156/162: disable org-superstar in org source code block, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 2cd3f1e74b 160/162: Merge pull request #31 from andersjohansson/avoid-empty-font-lock-keyword, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 01dad8e3ca 030/162: removed ridiculous warning., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 762fa160fd 114/162: Clarified position of string value in custom interface., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 930a887430 111/162: Add support for extra-wide headline bullets + terminal fallback., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 66e593a8b7 102/162: Support advanced composition for TODO item bullets.,
Stefan Kangas <=
- [nongnu] elpa/org-superstar 27e90eece5 124/162: Implement org-indent compatibility, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 48660e9269 120/162: Updated news regarding Doom and Spacemacs, updated FAQ., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar cfb98c0de6 123/162: updating .gitignore, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 6673412725 132/162: Updating README to signify changes, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 2800b83e88 133/162: Version Bump., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 7f83636db2 136/162: Update README for absolutely astonishing 33k+ dls on MELPA, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar a5af8b6ddf 141/162: Remove example files from #21., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 417b81772a 147/162: Support defining a default TODO bullet, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 3efb5f76cb 146/162: Allow hiding leading bullet for all todo keywords, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 6cdb79e5fa 148/162: Bugfix: Stop interpreting normal headings as TODO items., Stefan Kangas, 2021/12/31