Closed jdtsmith closed 1 year ago
Yes, I may mention it but it doesn't seem ready yet. Does it work with line-spacing>0? Do you plan to release it on ELPA/MELPA? Ideally I would also add this to org-modern itself but it is very complex, which I find hard to justify for the block prettification only.
Does it work with line-spacing>0?
I mean it works but just doesn't look as good.
Unless I'm missing something (possible), by definition you cannot draw within the line-space pixel buffer between lines. It is documented at least. I would recommend people use a font with larger line spacing.
I would also add this to org-modern itself
Would be better long term. I actually had the latest rewritten version as a draft PR for you, but then once I looked at the complexity (which grew when I discovered editing headings re-indents the contents), thought better of it. There was great response on Reddit, so it seems people are interested in this functionality.
Do you plan to release it on ELPA/MELPA?
I may let it simmer for a bit longer with the (completely rewritten) new version and then submit it to Elpa. Not sure it belongs there, though. Lots of people are using :straight now it seems.
...doesn't look as good.
This is what I mean. It does not work.
Unless I'm missing something (possible), by definition you cannot draw within the line-space pixel buffer between lines. It is documented at least. I would recommend people use a font with larger line spacing.
I disagree. line-spacing
is a perfectly good setting. I implemented org-modern with line-spacing>0 in mind. I believe there is a possible solution. You can maybe create a thin white space character (display space width 1) and then give it the color of the line as background. This way you should get a continuous line. The rounded corners are a bigger problem though.
There was great response on Reddit, so it seems people are interested in this functionality.
Yes, it seems that there is interested, so I am not opposed to adding it. But it must work with line-spacing>0.
I may let it simmer for a bit longer with the (completely rewritten) new version and then submit it to Elpa. Not sure it belongs there, though. Lots of people are using :straight now it seems.
Okay, maybe rather add it to org-modern directly.
line-spacing is a perfectly good setting
As is org-indent ;).
I believe there is a possible solution. You can maybe create a thin white space character (display space width 1) and then give it the color of the line as background. This way you should get a continuous line.
Interesting idea. I didn't realize you can style the full-height background like this (never used line-space>1). It would actually be good to stop including the bracket in the line-prefix when the block is flush-left, since when editing headings, org-indent aggressively re-prefixes the entire content (which means I have to aggressively re-style the indent).
I played around with specified space with BG a bit:
display :before
option for text-properties; how do you handle this? It's awkward when block content is flush-left to the beginning of the line. Do you copy the first character of the line as propertied string, prepend the slim bracket glyph and display-replace it as a decorated version of itself? Need a :before
! If I figure this out, and I can simplify the current design of org-modern-indent so as not to worry anymore about what org-indent is doing with the indent.So maybe a solution would look like:
Seems like a simpler solution is out there (sans SVG of course). I also note that many modes draw with unicode box characters (vundo, various tree-modes, etc.) will also break with line-spacing>1. One may sensibly argue these types of modes have "standalone control" of their buffer so can enforce line-space=1. But still, it's not a unique problem.
Okay, maybe rather add it to org-modern directly.
That would be my preference too. I'll noodle with it.
Note that terminal support is not very relevant for org-modern. org-modern only aims to work well on the GUI due to its visual features. I never tested this package in the terminal. Some prettifications may work well nevertheless.
Something like these are possible, (mostly) independent of line-spacing:
But selecting still overrides the BG value, as does the cursor.
One could also I suppose use overlays. Then before-string
and priority would be possible. Sounds difficult to keep track of though.
You might mention org-modern-indent here, which is now more stable as it no longer uses dirty font-searching hacks (in fact I borrowed some of the ideas from your fringe block font-lock code).