Fix: (-view--format-element) Remove text properties from keywords

Modes like org-indent-mode and org-modern can add text properties to
to-do keywords in Org buffers, and those properties can "bleed over"
when org-element copies those regions into strings.  When those
strings are then displayed in an org-ql-view buffer, they can affect
how the keywords appear, e.g. having extra spaces prefixing them,
which breaks alignment.  We apply faces to the keywords ourselves, so
we don't need any properties from the source buffer.

Fixes #455.
This commit is contained in:
Adam Porter 2024-08-29 14:21:50 -05:00
parent b6704c2814
commit 357d533b75
3 changed files with 51 additions and 45 deletions

View file

@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
** 0.8.8-pre
Nothing new yet.
*Fixes*
+ Remove text properties from to-do keywords before displaying them in an ~org-ql-view~ buffer. (Such text properties could cause them to, e.g. display with extra leading spaces, depending on which other modes might be enabled in the source Org buffer.)
** 0.8.7