Comments (14)
Oh, that IS news to me! I'll have a look in the near future :)
from org-superstar-mode.
Hi @wakatara, that's a pretty nifty idea! I'll have to think about it, though I may not manage to do so properly before February.
from org-superstar-mode.
Well, I am using the right triangle now to demarcate the first two levels (as I did mess around with Notion over the holidays) and the toggle feature there is very nice (which is basically just org-mode folding and unfolding but with a nice vidual indicator. Also, while I'm thinking about it, this would also remove the need for the org-mode end of line ellipsis I currently use as well (which happens to be a down triangle... :-/ ).
And I am sure I can hold my breath till February. Thanks for all your work on this library! Makes the UX in org-mode much much nicer. Makes a big difference.
from org-superstar-mode.
Actually, an even better think here would be to also allow the bullet to be optional or distinct if there was information in the fold.
So, for example, have a simple hidden or missing bullet if it's simply a headline but then display a ▶ if there is actual content folded into the headline (and then, of course, the down arrow ▼ once unfolded... =]
from org-superstar-mode.
I finally have more time on my hands to look into this a little more. I looked a bit into the options and I'm afraid that the solution for this is the same that allows for example creating even more interactive elements in Org that can hide away information. It's a project I have put on hold for a while but wanna pick up again soon. The core technical issue to overcome with it is twofold:
On the one hand, you can have text in an Emacs buffer hold such metadata (like "do I belong to a folded entry?") effortlessly, but keeping this metadata up to date requires a lot of moving parts in real time. Essentially each time the user executes a command and changes the buffer some bookkeeping will need to be done. This is the job of a mode that wants to achieve this.
On the other hand, making Emacs visualize that metadata ("ah, this bullet belongs to a folded entry, hence I ought to display it as..") is also rather simple. This task is deferred to font-lock, which handles everything from syntax highlighting to Superstar making Org look nice. However, font-locking can be quite expensive, hence font-lock does not just constantly update the buffer but tries to only change bits it "has to".
And that's the problem, really: Keeping these two independent processes in sync, and I'm working on an entire mode dedicated to nothing but keeping these two things in sync. I have not yet found a solution for this that can't be confused by simple operations, however (like cutting out large chunks of a buffer etc). My next plan towards this goal is to first write down and explain what I am doing over there and talk to the Emacs upstream to gain a deeper understanding of "real-time" font-lock. Sorry for the rant, but after discovering that this leads down the same rabbit hole as #20 I thought it was necessary to mention this at least somewhere.
To get back to your initial request, there may be a way to do this specific thing with a nice hack involving orders of magnitude less complexity, so I'll see if I can come up with something over the weekend. If not, it is only an even bigger incentive to get the org-menu-mode engine to run without race conditions and other timing nonsense.
from org-superstar-mode.
Wow, that is much more complex than I thought it would be (so, out of curiosity, how does the org-mode ellipsis symbol know to appear on fold and unfold then?). Thank you for even considering it.
I think your entire mode sounds very interesting and have to admit I selfishly want it since I'd also like better TeX rendering than org-mode currently support in-buffer.
In any case, certainly interested to see what you come up with. I have to admit to only have messed around with font-lock over the Xmas holidays when I wanted to make my emacs experience a lot closer to something like Notion, so really interested in seeing the results.
from org-superstar-mode.
Yeah, sadly it's a bit hairy.
so, out of curiosity, how does the org-mode ellipsis symbol know to appear on fold and unfold then?
Org mode uses overlays for that, which are rather convenient, but as far as I'm aware can cause slowdown if used extensively. I usually restrict myself to using text properties exclusively, especially since my modes would easily double/triple the amount of overlays in the worst case.
(EDIT: I have consulted the info node again, and yes, excessive use of overlays is discouraged.
Good to know where I got that from. 😅 )
Anyway, I'll work on a more coherent update on the matter on the other repo, though I will likely first have to do some Font Lock research...
from org-superstar-mode.
This would definitely be a cool feature! (maybe something for upstream org even). BTW, @integral-dw, if you are not aware of @yantar92's work on reimplementing the org folding mechanism with text properties instead of overlays, you should take a look at that. May be some overlap or inspiration for org-superstar: https://github.com/yantar92/org
from org-superstar-mode.
I have been using the org-fold branch for a few weeks and found that it speeds up my large org files. Hopefully it will be ready for merging soon.
from org-superstar-mode.
@andersjohansson
What does org-fold do precisely? (and have you seem origami? I use that to help with folding in super-org-agenda. It is great.).
from org-superstar-mode.
Hola! Was just wondering if you ever got a chance to look into those overlays. (the interesting thing is most apps that use a web rendering (notion, workflowy, etc et) and lists now do the "▶" to "▼" swivel thing now. It is actually a suprisingly nice dynamic.
Anyhow, was just wondering as I was back in org-mode again... =]
from org-superstar-mode.
from org-superstar-mode.
Hi everyone,
sorry I've been so quiet. I've been out of commission last year and am slowly working through the issues again.
The org-fold patch in principle may allow me to implement that feature quite neatly, actually. I'll need to do some housekeeping in the Issue tracker but I'm just letting you know it's on my mind, thank you for your patience!
from org-superstar-mode.
By the way, outline-mode got these kinds of toggles in Emacs 29. I haven’t looked into the implementation, and whether it can be used for org (which has recently split with outline-mode). But looks promising.
from org-superstar-mode.
Related Issues (20)
- Not all bullets are displayed correctly HOT 3
- Huge slowdown on emacs 27.1 HOT 5
- Pretty tables using box drawing characters HOT 7
- I it possible to have the leading bullets the same as the non-leading bullets? HOT 1
- Replace the TODO and DONE keywords with unicode? HOT 2
- org-superstar-item face is only applied to star-items HOT 1
- Disable heading superstar HOT 1
- allow emojify-mode to overrule org-bullets
- [feature request] hide ALL stars/bullets for some heading-levels HOT 2
- src block output not fontified with org-superstar HOT 1
- change item bullet by its level, not its bullet char
- Unicode icons not rendering the same when in daemon mode HOT 3
- org-superstar is automatically deactivated after file saving HOT 2
- What is the configuration for the appearance of the picture in the readme? HOT 1
- Readme not correct. HOT 1
- Wrong bullet rendering with Iosevka HOT 3
- custom to apply text-property to bullets
- (setq org-startup-with-inline-images t) breaks org-superstar (when opening a new document) HOT 1
- Level 3 and 6 Headings' icon look off HOT 1
- Ctrl-a Doesn't Work Right
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-superstar-mode.