-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DIY section about org-modern-label
- Loading branch information
1 parent
ad1b709
commit 79bb143
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79bb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minad Do you think this is okay? I will include it in the change log as well.
79bb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resetting the face is fine from the side of the user, if the user doesn't like the adjusted size of the labels. See also the docstring of org-modern-label. You could mention face-spec-reset-face as an alternative and put it in a with-eval-after-load block for org-modern. You should also recommend to set org-modern-label-border to nil to disable the "label effect", used to emulate the look from Rougier's svg-tag-mode.
What you write about alignment is not correct. The problem is that org-modern doesn't only modify the faces, but it also adds display properties. This affects for example TODO status keywords, which will get a space to the left an right of the keyword, see https://github.com/minad/org-modern/blob/828cf100c62fc9dfb50152c192ac3a968c1b54bc/org-modern.el#L360-L362. Also timestamps with date and time are affected, see https://github.com/minad/org-modern/blob/828cf100c62fc9dfb50152c192ac3a968c1b54bc/org-modern.el#L407-L408. This already destroys alignment, even if you reset the faces. You can observe the alignment issues with text as follows:
Preserving fixed pitch alignment isn't a goal of org-modern, but we could discuss introducing a user option org-modern-preserve-alignment if we can still make the end result look pretty. In your case it seems that the main problem is table alignment for clock tables and not alignment in general? In the end the only way to solve the table issues is to use pixel-perfect alignment (minad/org-modern#5). But for now I would just recommend to disable styling all elements which should not break alignment, e.g., org-modern-timestamp=nil.
79bb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Daniel and thanks for the detailed explanation!
Yes. This is the only area I identified where someone may notice a major difference when they update to the new version of the themes. I will phrase it better.
So you mean this without touching the
org-modern-label
, right? It should work for the case I noticed.79bb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You can leave the label face alone if all you care is the alignment of timestamps in tables. To fix that it is better to just disable org-modern-timetamp=nil. Maybe it is even possible to do this via some file-local variables such that files without clock tables still get timestamp formatting, in case you like that.
79bb143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!. The simplest solution will do. It is just to inform users in advance before they come asking for it. I will update the document now. The new version will be done tomorrow, most likely.