minad / org-modern

:unicorn: Modern Org Style
GNU General Public License v3.0
1.51k stars 46 forks source link

Prettify vertical lines in column view #112

Closed orgtre closed 1 year ago

orgtre commented 1 year ago

Thanks for this great package. I wonder whether it would be possible to prettify vertical lines in column view (org-columns), just like in tables?

minad commented 1 year ago

Thanks. Since org-columns is a separate mode it feels a bit out of scope of org-modern. Also I am not a user of this functionality, so it is not likely that this gets added here. But if you want feel free to propose a patch and we can discuss it.

orgtre commented 1 year ago

OK, I took a stab at this. The approach used in org-modern for tables doesn't work for column view, as the text and dividers are displayed in overlays and already by using the display property. Nesting a further display property within the overlay text doesn't work and to split the overlays so that there are separate overlays for the dividers requires too many changes in column view.

Instead, as far as I can tell, the best approach is to slightly modify the functions org-columns--display-here-title and org-columns--display-here to allow customization of the divider character, and then use a properly propertized 'hair space' or 'thin space' for it. See here and here for a working implementation.