[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug: org-priority face has extra space at the end starting from vers
From: |
Protesilaos Stavrou |
Subject: |
Re: Bug: org-priority face has extra space at the end starting from version 9.4 [9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)] |
Date: |
Sun, 04 Oct 2020 17:36:47 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On 2020-09-29, 08:00 +0000, Roman Rudakov <rrudakov@pm.me> wrote:
> "Protesilaos Stavrou" <info@protesilaos.com> writes:
>
>> Roman Rudakov <rrudakov@pm.me> [2020-09-15, 18:50 +0000]:
>>
>>> I use theme which draw boxes around priority cookie. Before updating to
>>> version 9.4 box was rendered just around square brackets, but since
>>> version 9.4 it has additional space at the end.
>>>
>>> I think it's related to the fact that org-priority face definition used
>>> to use separate regex which didn't include space, and now it uses
>>> variable org-priority-regexp which does include additional space
>>> character.
>>>
>>> [...]
>>
>> This issue is noticeable with any face properties for 'org-priority'
>> such as box, background, underline, overline.
>>
>> Just to add a reproducible recipe for this case.
>>
>> On 'emacs -Q' running Org 9.4:
>>
>> + C-x C-f /tmp/test.org
>> + Insert a heading, like:
>>
>> * TODO [#A] This is a test
>>
>> …see attached screenshot with "default" state.
>>
>> * Now evaluate the following expression:
>>
>> (set-face-attribute 'org-priority nil :underline t)
>>
>> …see attached screenshot with "edited" state.
>>
>> --
>> Protesilaos Stavrou
>> protesilaos.com
>
> Hello,
>
> I think proper value for `org-priority-regex` should be
> ".*?\\(\\[#\\([A-Z0-9]+\\)\\]\\) ?", extra space should be moved out of
> the brackets, It won't break anything and face definition will be
> correct.
>
> Best regards.
This is to confirm that I and Ilja (in Cc) get the desired behaviour by
evaluating the suggested regexp.
Steps to quickly reproduce this on 'emacs -Q':
+ C-x C-f /tmp/test.org
+ Insert a heading with a priority cookie:
- * TODO [#A] This is a test
+ Evaluate: (set-face-attribute 'org-priority nil :background "#ddd")
- The background is just to visualise the extra blank to the right of
the cookie's closing bracket. Same principle for underlines,
overlines, boxes.
+ Eval: (setq org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]+\\)\\]\\) ?")
+ M-x org-mode-restart
+ The extra space which was coloured before should no longer be affected
by the face properties. The background we added must only cover the
priority cookie's text.
Best regards,
Protesilaos
--
Protesilaos Stavrou
protesilaos.com
- Re: Bug: org-priority face has extra space at the end starting from version 9.4 [9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)],
Protesilaos Stavrou <=