Code Monkey home page Code Monkey logo

org-superstar-mode's People

Contributors

andersjohansson avatar integral-dw avatar leungbk avatar progfolio avatar taquangtrung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org-superstar-mode's Issues

Feature Request: Hiding the TODO keyword, with bullets replacing them visually

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)

change item bullet by its level, not its bullet char

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.

Item bullet face isn't applied to ordered lists (lists like 1. 2. 3.)

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:

noface

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

Level 3 and 6 Headings' icon look off

Whenever I use three, six, or ninth level headings etc, It displays a weird character. I'm using Doom Emacs with Nerd fonts and Arial if that matters.

image

org-superstar ignores the first level in bullet lists

I'm not sure it's by design or not, but I have this issue with org-superstar.

For example, if we have something like this.

- A.
  - B.
  - B.
- A.
  - C.
  - C.

In the example above only B and C-notes will display with a new symbol from org-superstar-item-bullet-alist.

screenshot-1585762928

Replacing trailing bullets by UTF-8 bullets

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,..."

Improving Inline Tasks Support

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!

Unicode icons not rendering the same when in daemon mode

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
    image

  • None daemon mode
    Char: * (42, #o52, #x2a) point=144 of 177 (81%) column=0
    image

The output of what-cursor-position is on the first bullet

org-indent not working when using org-superstars

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:

Screenshot 2020-11-21 at 10 11 25

Screenshot 2020-11-21 at 10 11 39

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!

SRC blocks are highlighted now

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

2020-04-16-01:44:58_region

This was perhaps introduced by 3fbfc0a?

Ctrl-a Doesn't Work Right

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:

  1. emacs --no-init
  2. M-x package-install org-superstar
  3. C-x f ... test.org
  4. Write the following lines
  • Hello
    ** World
    ** !
  1. M-x load-file ... .emacs.d/elpa/org-superstar.../org-superstar.el
  2. M-x set-variable org-superstar-remove-leading-stars ... t
  3. M-x org-superstar-mode
  4. Starting at the "Hello" line, press C-n twice, then press C-a.
  5. Instead of remaining at the beginning of the line as expected, you end up at the end of the "World" line.

Advanced composition for headline and TODO bullets

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?
2020-03-26-20:25:05_region

Setting org-superstar-remove-leading-stars to 't' corrupts headings

Observed behavior

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

Expected Result

** heading 1
** 
** heading 2

How to Reproduce

  1. start: emacs -q
  2. (load "org-superstar.el")
  3. (setq org-superstar-remove-leading-stars t) ;; <-- that's the culprit, if nil, it works correctly
  4. (org-superstar-mode)

Readme not correct.

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?

[IMPROVEMENT] Toggle bullet on folded versus unfolded headline state - ▶ to ▼

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.

src block output not fontified with org-superstar

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

Testing org-superstar with older emacs and org versions

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:

  • emacs 24.3 (probably optionally, this might be considered too old)
  • emacs 25.1
  • emacs 25.2
  • emacs 25.3
  • emacs 26.1
    and their accompanying org versions, most older than the current requirement. (26.2 and 26.3 are already covered given the package requirement).
    I'm planning to test opening an org file with org-superstar enabled, and turning org-superstar off and on again while still in the file, and maybe also change a setting that would require me to run org-superstar-restart. If there is anything else I should test for please let me know.
    I'll update here once I'm certain with my conclusions (this won't take too long, as I already started testing and it's quicker than I expected).

Replace the TODO and DONE keywords with unicode?

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.

Huge slowdown on emacs 27.1

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)

Wrong bullet rendering with Iosevka

I have some strange issues with Iosevka, when i render headings there is no spacing

org-bug

But with another font (like inconsolata) org-superstar works properly

org-bug-working

org-superstar is automatically deactivated after file saving

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,

[feature request] hide ALL stars/bullets for some heading-levels

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 "" "" "" "" "*"))

The modeline string doesn't render correctly

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).
org-superstar-modeline-problem-windows
org-superstar-modeline-problem-linux
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,
org-superstar-modeline-problem-windows-2
but not on Linux.
org-superstar-modeline-problem-linux2

Setting org-superstar-remove-leading-stars to t breaks some built-in org movement commands.

I recently discovered that setting (setq org-superstar-remove-leading-stars t) makes the org-{forward,backward}-heading-same-levelcommand 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.

Looking for feature suggestions

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:

  • Perfomance Questions 🖥️ 🔥
    It seems that there were performance issues related to the rendering of UTF8 characters. This seems to have been primarily an issue on windows, but sadly I currently have no way to test that. I would appreciate checking this package's performance on a modern windows computer!
  • TODO-specific header bullets ☑️
    Another interesting suggestion was to add special bullets for TODO and DONE headings, as suggested by @sumitsahrawat. I would like to know if people are generally interested in such a feature.
  • Bug Reports 🦋
    Different codebase, different bugs. Currently I have squashed all bugs I could find, but I have more faith in my ability to produce bugs than in my ability to find them. If any strange behaviour crops up, be sure to open an issue!

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!

Suggestion

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!

org-superstar-item face is only applied to star-items

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.

Allow using multiple characters for each level.

Does org-superstar-mode support using multiple characters for heading stars?
I'm trying to mimick Bear's behavior, as seen below:

Screen Shot 2020-12-23 at 21 33 00

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!

Disable heading superstar

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.

Regarding Tests

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.

Not seeing all options to customize / superfluous interactive command

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

custom to apply text-property to bullets

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))))

Hidden stars do not persist on theme change

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.

Not all bullets are displayed correctly

image
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
image

I'm using the latest emacs-git version

[IMPORTANT] compose versus display: future-proofing Superstar

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.