Make org-{bullets, super-star} mode optional or properly mark them as dependency
AloisJanicek opened this issue ยท 7 comments
If emacs library depends on other emacs library, this dependency should be specified in library header as described in D.8 Conventional Headers for Emacs Libraries.
;; Package-Requires: ((org-bullets "0.2.4") (org "9.0"))
this should ensure that emacs package managers will install the org-bullets (or in the future org-superstar) dependency.
But requiring whole package just because of definition of one list will not make some users, me included, much happy.
Instead I would propose making pretty bullets package optional dependency, mentioning it in the README and setting up shrface-bullets-bullet-list
as copy of org-bullets-bullet-list
only when org-bullets-bullet-list
is bound.
(defcustom shrface-bullets-bullet-list (if (bound-and-true-p org-bullets-bullet-list)
org-bullets-bullet-list
'("*" "*" "*" "*" "*" "*"))
"Bullets for headings"
:group 'shrface
:type '(repeat (string :tag "Bullet character")))
Agreed, just updated.
If there is bound-and-true-p
check on org-bullets-bullet-list
deployed then there is no reason to actually marking org-bullets
as dependency in library header because that results in download and installation of org-bullets
even if that package is not actually needed anymore.
;; Package-Requires: ((org "9.0"))
If there is
bound-and-true-p
check onorg-bullets-bullet-list
deployed then there is no reason to actually markingorg-bullets
as dependency in library header because that results in download and installation oforg-bullets
even if that package is not actually needed anymore.;; Package-Requires: ((org "9.0"))
Thanks for your reminds! Updated!
Actually setting up value of shrface-bullets-bullet-list
like this
(or (bound-and-true-p org-bullets-bullet-list)
(bound-and-true-p org-superstar-headline-bullets-list)
'("โ" "โ" "โ" "โฟ" "โ" "โ"))
would be even better since bound-and-true-p
returns the value of its argument or nil
and it would cover the other bullets package, however folks have probably bullets packages in org-mode
's hook and if they lazy load org-mode
similarly like it is done in doom-emacs, those symbols won't be bound if user didn't run org-mode
prior to using shrface
.
So I think it is worth to consider makeing shrface
require bullets packages
(ignore-errors
(require 'org-superstar)
(require 'org-bullets))
before setting up shrface-bullets-bullet-list
or instruct users in README how to it on their own in eval-after-load
or under :config
keyword of use-package
declaration.
Actually setting up value of
shrface-bullets-bullet-list
like this(or (bound-and-true-p org-bullets-bullet-list) (bound-and-true-p org-superstar-headline-bullets-list) '("โ" "โ" "โ" "โฟ" "โ" "โ"))would be even better since
bound-and-true-p
returns the value of its argument ornil
and it would cover the other bullets package, however folks have probably bullets packages inorg-mode
's hook and if they lazy loadorg-mode
similarly like it is done in doom-emacs, those symbols won't be bound if user didn't runorg-mode
prior to usingshrface
.So I think it is worth to consider makeing
shrface
require bullets packages(ignore-errors (require 'org-superstar) (require 'org-bullets))before setting up
shrface-bullets-bullet-list
or instruct users in README how to it on their own ineval-after-load
or under:config
keyword ofuse-package
declaration.
Thanks for your detailed thinking and guidence~ I just updated and also update the default shrface-bullets-bullet-list
which is same as org-bullets
and org-superstar
.
I think that issue is solved, so I am closing it.
Thank you for making the idea of colorized and propertied text in (not only) eww
buffers reality.
I think that issue is solved, so I am closing it.
Thank you for making the idea of colorized and propertied text in (not only)eww
buffers reality.
Appreciate that~