Code Monkey home page Code Monkey logo

Comments (7)

integral-dw avatar integral-dw commented on June 18, 2024 2

Hi, quick update: I'm pretty sure I found the culprit, but I need to give a little context.
Vanilla Org ships with a variable called org-hide-leading-stars. If non-nil, it hides the leading stars in a very primitive fashion, that is by setting their color to the background color (or whatever the face org-hide is set to). org-superstar honors that value, and consequently has a "hands-off" approach when it is enabled. This is done to keep Superstar more orthogonal to Org itself.

Now, you may be wondering why all that matters when you explicitly turned it off? That is because org-indent overrides the value of org-hide-leading-stars while active and sets it to t. Consequently it basically tells Superstar that it wants to take over hiding the stars. This is why you get that strange effect. This can be turned off setting org-indent-mode-turns-on-hiding-stars to nil, adding the following to your config should do:

(setq org-indent-mode-turns-on-hiding-stars nil)

So what remains now is for me to figure out how and where to document this.

from org-superstar-mode.

integral-dw avatar integral-dw commented on June 18, 2024 1

Hi @iburunat, thanks for the working example! I think I have an idea what the root cause for this is (likely it relates to org-indent messing with the leading starts on its own, overriding superstar's behavior). I'll tinker with this a bit, though I may be slow to respond this month. I'll keep you updated!

from org-superstar-mode.

integral-dw avatar integral-dw commented on June 18, 2024

Hi @iburunat! Thanks for bringing this to my attention. It would be a great help if you could provide a minimum working example config of Org (that is, a small excerpt from your setup including org-indent) that reproduces this problem with default Emacs (meaning Emacs run with emacs -Q). If there's any way I can help with that, be sure to let me know!

from org-superstar-mode.

iburunat avatar iburunat commented on June 18, 2024

@integral-dw, Sure thing! Thanks for looking into this.

First, start emacs with emacs -Q and then run this snippet below on the *scratch* buffer:

(require 'package)
(package-initialize t)
(add-to-list 'load-path "~/.emacs.d/elpa/org-superstar-20200818.2257/")
(require 'org-superstar)
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
(setq org-hide-leading-stars nil)
(setq org-superstar-leading-bullet ?\s)
(global-hl-line-mode 1)
(custom-set-faces
 '(hl-line ((t (:background "dark magenta" :foreground "white")))))

Now, create a simple orgmode document with two-level headings and add #+STARTUP: indent and run it with C-c C-c, you will get the behaviour I get. To compare, you can run #+STARTUP: noindent and see how the preceeding stars are hidden when the cursor is on that same line.

Hope this works for you and you can reproduce the bug,
Thanks in advance!

from org-superstar-mode.

AtomicNess123 avatar AtomicNess123 commented on June 18, 2024

I'm having this issue as well.

from org-superstar-mode.

iburunat avatar iburunat commented on June 18, 2024

@integral-dw Sounds good. There is no rush, just thought it was worth to mention this issue. Hope there is a "cure" for it in the future :) Thanks a mil.

from org-superstar-mode.

iburunat avatar iburunat commented on June 18, 2024

It works perfectly! So beautiful... thanks thanks thanks! :))

from org-superstar-mode.

Related Issues (20)

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.