integral-dw / org-superstar-mode Goto Github PK
View Code? Open in Web Editor NEWMake org-mode stars a little more super
License: GNU General Public License v3.0
Make org-mode stars a little more super
License: GNU General Public License v3.0
Not really a breakage of sorts but a feature request: a variable that will toggle hiding the actual keyword in place of the bullet replacement. I'm basically imagining org-mode turning into a convincing facimile of a Bullet Journal.
This feature already is a great step in that direction but I'm still stuck looking at hoards of keywords in place of clean bullets and boxes.
Originally posted by @ykhurshid in #9 (comment)
I am currently using -
as the bullet character only.
Hence, list the current item replacement is visually not doing much for me. I am now toying with org-list-demote-modify-bullet
to see whether I can get something along the lines of what I had in mind.
But I have a large legacy of Org files and data, that was authored with -
list items only. Converting all that content does not look like an exercise that would seem particularly tempting to me.
I would thus like to propose an alternate mechanism for replacing list bullet symbols: by their level, i.e. the number of spaces preceding them. Determining the level may however not be trivial depending on the settings for the various org-indent-*
stuff.
This new mode should again have two different behaviour options. Either repeatedly cycle through all defined list bullet symbols, or reuse the last one for all deeper levels.
Doom emacs. If you add (setq org-startup-with-inline-images t)
to (after! org ... )
block org-superstar-mode stops working.
Any hints what may be causing this would be really appreciated. It took a veeeery long time to figure this out and would be really keen on solving it.
I've noticed it only after switching from X11 to Wayland though, so now there is that as well.
I actually like that I have N stars at the N-the heading.
I would like to just prettify (all of) them the way org-superstar does.
Is it possible?
In my config I use both org-superstar-mode and emojify-mode.
I had hoped that the emoji I use would be overwritten with emojify's images in stead of the UTF-8 characters.
Any idea how to get this to work? :)
I'm just interested in highlighting item bullets. I don't change the item bullets nor the headers.
I use:
** a
- a
- a
- a
** b
+ b
+ b
** c
+ c
+ c
** d
1. d
2. d
** e
1) e
2) e
And I see:
I expected the 1.
and 1)
highlighted in the same way because they are also list pointers. Well, they're numbers, but they're clearly used as list bullets (and they're interchangeable with the other bullet types).
I applied this config, more or less:
(defface my-org-bullets
'((t (:background "#660000")))
)
(setq org-superstar-prettify-item-bullets 'only)
(setq org-superstar-item-bullet-alist nil)
(custom-set-faces
'(org-superstar-item ((t (:inherit my-org-bullets))))
)
Using version from commit 54c81c2, after 1.5.0
Hello,
I'm a new user or org-superstar running MELPA Version 20200416.2354 on top of org version 9.3 and Emacs snapshot 28.0.50.
I'd like to replace trailing dots (...) at the end of headlines of collapsed sections by something more pleasant, and I thought that maybe "replacing trailing bullets by UTF-8 bullets" is the feature I need. However, I don't see any replacement happening, nor am I able to find any relevant customization or even code in the org-superstar.el
.
What do I miss?
As a side-note, as far as I can tell, the "Installation" instructions could be reduced to:
(require 'org-superstar)
(add-hook 'org-mode-hook 'org-superstar-mode)
No lambda needed, as org-superstar-mode "If called from Lisp, also enable the mode if ARG is omitted or nil,..."
I confess that I hardly use inline tasks at all, so I'm not requesting this. However, cleaning up the stars from inline tasks would be a very cool feature. So if you're looking for an excuse to do it, you can say that someone actually commented on it. ;) Maybe a nice idea for 1.1?
Originally posted by @alphapapa in #3 (comment)
I thought it may be a good idea to make this it's own issue. I'll get to it sometime soon!
When in emacs daemon mode the icons do not render the same. When running on a daemon mode, they are a lower quality and just do not look as good
Font - Literation Mono Nerd Font
Emacs Version - GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32)
Here is my full config
Daemon mode
Char: * (42, #o52, #x2a) point=144 of 177 (81%) column=0
None daemon mode
Char: * (42, #o52, #x2a) point=144 of 177 (81%) column=0
The output of what-cursor-position
is on the first bullet
I recently started using this excellent, visually soothing package, thank you!
I just noticed an interaction between org-indent and org-superstars, in that I can't seem to hide the preceding stars in ORG
headings while keeping the indentation of the text below each heading.
Here the issue:
My init.el code referencing org-superstars is as follows:
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
(setq inhibit-compacting-font-caches t)
;; This is usually the default, but keep in mind it must be nil
(setq org-hide-leading-stars nil)
(setq org-superstar-leading-bullet ?\s)
Have you stumbled upon this problem?
Thanks for any help,
Cheers!
Looks like src blocks are highlighted using the -
, +
, and *
elements now.
I create a SRC diff in one of my files, and all the +'s are replaced by ➤
. This also appears to be the case when I create an empty
#+BEGIN_SRC
+ hey
- this
* should not be fontified
#+END_SRC
This was perhaps introduced by 3fbfc0a?
When org-superstar is enabled with the option org-superstar-remove-leading-stars set to t, Ctrl-a doesn't work correctly.
I suppose this must not be a commonly used option, because breaking Ctrl-a is obviously a rather major bug.
To reproduce:
Thanks for the cool package!
I came up with some nice icons for my different TODO states
(setq org-superstar-todo-bullet-alist '(("NEXT" . ?☐)
("WAIT" . ?⌛)
("SOME" . ?☁)
("DONE" . ?☑)
("CANC" . ?☒)
However, the font-width of these characters is slightly different. This means that the headlines look a little wonky. Any idea how to fix the width of the bullet icons somehow?
sample org file:
** heading 1
** heading 2
if point is placed on heading 1 and then C-<ENTER>
is pressed this leads to the following result:
** heading 1
***
* heading 2
** heading 1
**
** heading 2
(load "org-superstar.el")
(org-superstar-mode)
The readme says that I just need to type this for config:
(require 'org-superstar)
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
I did that, but it does NOT automatically enable org-superstar-mode when org-mode gets activated, I have to enable it manually every time.
Any ideas?
I am currently using org-superstar (thank you) but am looking to make the UX on using it with org-mode a bit more like the toggles that you see in the popular program/web application Notion.
Basically, I want to have folded headlines bulleted with a "▶" and then when I tab to unfold the headline have the bullet change to be a "▼" ( a transition animation might be kinda nice, but hardly necessary. =] ).
If there is a way to do this already in superstar, and I just didn't figure it out, I apologize, but it seemed a nice effect to have as well as possibly being a cleaner mechanic than straight up bullets in some regard.
thanks!
Daryl.
This feature is already present in the prototype https://github.com/Fuco1/org-pretty-table. Unfortunately this project seems unmaintained. Maybe the pretty table feature could find a new home here? I think the feature would fit well into the scope of the org-superstar-mode package.
See emacs-jupyter/jupyter#366.
On Emacs 27.1, with org 9.4.6+ (also tried at 9.5.1) - output of src blocks is not fontified if org-superstar
is loaded (the problem persists even when turning org-superstar-mode
off).
Tested with a minimal config, loading only org-mode.
Lack of fontification can be checked with:
#+begin_src python :results output
print('AB\x1b[43mCD\x1b[0mEF')
#+end_src
#+RESULTS:
: AB�[43mCD�[0mEF
As stated in the discussion here, the current requirements of org-superstar, that is emacs 26.2 and org 9.1.9, are simply what @integral-dw had available for testing. Given that, it seems imperative to test for older emacs and org versions in case org-superstar can work on these without adding any compatibility workarounds. I decided to take it up on myself, to make sure that it will happen. The method I've thought of so far is using the zip file releases of emacs on Windows 10, which will allow me to keep my existing emacs install and also run many other versions on the same machine (if there is a better method, please let me know), and using a minimal init file only installing and enabling org-superstar.
The versions I'll be testing for are:
org-superstar-restart
. If there is anything else I should test for please let me know.That would be really awesome since org bullets is no longer maintained.
Thanks for this great package, which makes org-mode appear like other fancy todo manager.
For now I use org-superstar-special-todo-items
option to make the leading stars become a checkbox depending on TODO and DONE keywords.
Is there a way to keep the leading stars and replace the TODO and DONE keywords with the checkbox?
For example, instead of
☑ DONE
I would like to have
♠ ☑,
where ♠ is the bullet replacing the leading star.
Hi, thanks for this pretty package!
I have recently updated to emacs 27.1 and using org-superstar-mode renders emacs unusable with bigger org files. Even for smaller files you can see the effect particularly when moving between headings or folding/unfolding. Adding
(setq inhibit-compacting-font-caches t)
to init.el didn't help.
I first experienced this using spacemacs (see this issue) something similar happens also on doom-emacs (issue).
I am not sure to what extent this is caused by org-superstar because on spacemacs a similar slowdown could be observed when visiting a huge org file with some "non-standard" unicode glyphs without org-superstar enabled. But this definitely happens also on vanilla 27.1 with just org-superstar.
I am attaching profile reports for vanilla 27.1. These were generated by opening the org file pasted below, doing M-x profiler-start
, then M-x org-superstar-mode
, moving the cursor between headings, folding/unfolding, and finally M-x profiler-stop
.
The org file:
* heading1
text
** heading2
text2
superstar_profilecpu.txt
superstar_profilemem.txt
M-x emacs-version
: GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, cairo version 1.16.0)
How did you configure org-superstar-mode, such that you the result is the one, shown in the picture?
I find it very aesthetically pleasing :)
Org-superstar is a great emacs mode, thank you for your work.
However, there is a problem bothering me a lot. I am not sure whether it is a bug or just I am using org-superstar in a wrong way.
I find that org-superstar is automatically deactivated after file saving. After file saving, I have to M-x org-superstar-restart to invoke superstar again otherwise it is deactivated. Such makes org-superstar almost not work for my org-mode work.
My config of superstar is minimal as below
(require 'org-superstar)
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
(setq inhibit-compacting-font-caches t)
I don't think there is any problem with my superstar config, but wonder the problem may be caused by a conflict with other emacs config, however I can not figure out at this moment.
Do you have any idea how it happens or how to solve it?
Best regards,
This would result to "bullet-less" headings e.g. in top-level.
I achieved this by setting:
(make-variable-buffer-local 'org-superstar-headline-bullets-list) ;; this only if you want it only for some org buffers
(setq org-superstar-headline-bullets-list '("" "" "" "" "" "" "*"))
resulting behavior is what i want, but produces some "syntax-sugar-noise", i guess because regex-searches (font-lock functions or overlays) are not prepared for an empty string "" character.
maybe would be cool to just spefify nil or sth: (setq org-superstar-headline-bullets-list '(nil nil "" "" "" "" "*"))
When org-superstar-mode is enabled, and no other modeline modifiers (e.g. minor mode hiders, like minions, or modeline beautifiers, such as all-the-icons or emojify) are installed/enabled, the modeline string (which is supposed to be a fancy star, as I can see from the source code, as rendered on Github), is either rendered as a tofu block (on my Windows 10 system - top picture, Courier being, it seems, the default font) or so badly as to be barely visible (on my Linux system - bottom picture, DejaVu Sans Mono being the default font).
To solve this, I'd suggest using instead either plain text (like the mode name - this might be a somewhat long string, but that's what packages like minions are for) or nothing at all (which won't display anything on the mode line, probably not as good for transparency).
Thanks in advance for your consideration.
P.S. Interestingly, when clicking on the modeline string, the icon on the popup menu has a better appearance on Windows 10,
but not on Linux.
I recently discovered that setting (setq org-superstar-remove-leading-stars t)
makes the org-{forward,backward}-heading-same-level
command ineffectual when the cursor is hovering on a subheading. However, those commands will work as intended on top level headings - presumably because there is nothing for org-superstar-remove-leading-stars
to do on such headings.
I'm using GNU Emacs 26.3.
So, as I previously hinted, I have taken a quick look at the open issues and suggestions over at org-bullets. Here's what I found:
TODO
-specific header bullets ☑️TODO
and DONE
headings, as suggested by @sumitsahrawat. I would like to know if people are generally interested in such a feature.That seems to cover the issue tracker of org-bullets. I would greatly appreciate comments regarding the points I found, how they may be applicable to or desirable for this package.
Thanks to everyone in advance!
Hi there,
I saw your post on the Org mailing list. I was afraid that you weren't going to share the link to the repo! This looks great! Nice name, too. ;)
Quick suggestion: the symbol prefixes should generally match the package name (e.g. MELPA requires this), so org-sstar
should be org-superstar
.
You may find this helpful in testing and linting: https://github.com/alphapapa/makem.sh
Can't wait to see this on MELPA!
Lists bullets starting with +
and -
are properly replaced using the mapping in org-superstar-item-bullet-alist
but their face still is org-list-dt
, so customization of org-superstar-item
only affects *
-bulleted lists.
Does org-superstar-mode support using multiple characters for heading stars?
I'm trying to mimick Bear's behavior, as seen below:
I tried changing the headline-bullets-alist but couldn't get it to do multiple characters. My skills with composition rules is also non-existent, and when I tried composing strings according to the rules of compose-region
, as mentioned in the docstrings, all I manage to do is get two characters overlaid on top of each other.
Any advice would be welcome and thank you for sharing this lovely package!
I have recently starting to use org-bars
, which adds its own heading bullets to org headings, but I still want to keep the bullet list prettifying from org-superstar
.
I tried setting org-superstar-headline-bullets-list
to nil but that just made all the heading bullets disappear.
Please add this feature, where we can disable heading bullets prettifying.
As @alphapapa correctly pointed out in my pull request, I have not been adding the tests I have run to the repo. I am currently working on fixing that by tidying up the tests I have run so far (as well as adding new tests) and adding them to the test sub-directory in the volatile branch. Once I am happy with the way a test is set up, I will commit it to main and start working on the next one.
I have little experience with (unit) testing in a way that is useful to others, so criticism is highly appreciated.
UPDATE. I think that settles the "messy" tests relying mostly on visual confirmation. What remains are a few proper unit tests, but I will first have to evaluate what functions really make sense to have a unit test attached. After all, I want to test function not implementation.
WIN10 user, Emacs 26.3, Scimax customization:
I loaded org-superstar via Melpa but I only see these options listed when called up via ALT-x.
org-superstar-mode
org-superstar-restart
org-superstar-headline-p
org-superstar-toggle-lightweight-lists
I dont see any of the other options to list/edit/cycle the bullets used as stated in the readme. Is there something I missed or is it a Win10 thing?
Thanks
I think it would be a good enhancement to allow a custom var for a text property (or properties) to apply to superstar bullets. My specific use case is that I am using unicode bullets that don't align real well vertically. I'm working around this right now with function advice:
(advice-add #'org-superstar--prettify-main-hbullet :after
(lambda (&rest r)
(put-text-property (match-beginning 1) (match-end 1)
'display '(raise 0.1))))
I see in the README that you mention you don't implement a "hide leadeing stars" feature because org already implements it in terms of org-hide-leading-stars
. The thing is that for me the hidden leading stars do not persist on theme changes with Org's variable. However, using org-bullets
the hidden leading stars stay hidden even on theme change. I would like the same thing to be the case with org-superstar
.
Title.
Only some of the top level bullets are displayed, usually they are always the same at startup but with a restart some other top level might get displayed and others don't.
It only happens with this set of bullets (U+1F7C1-8 tested, from the link "Geometric shapes extended" in the readme), but not with the other commented one.
When starting with the offending bullets, there are some error messages
I'm using the latest emacs-git version
Regarding this comment:
I'm sorry, but I don't share your enthusiasm about prettify-symbols-mode. It piggy-backs a feature, called "static character composition", which was never designed for this job, and which is nowadays rarely if ever used for the job it was designed for. So it has bit-rotted, and in some not-too-far future we will probably want to obsolete and remove the static character composition from Emacs, at which point prettify-symbols-mode will be a huge drag.
This is, of course, a valid point. I will have to contact the Emacs mailing list on this, because of course it's a hack, and depending on the general sentiment I will have to act accordingly (after all, we all want Superstar to not suddenly croak with a major release).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.