emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roman Rudakov <rrudakov@pm.me>
To: emacs-orgmode@gnu.org
Subject: 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: Tue, 15 Sep 2020 18:50:28 +0000	[thread overview]
Message-ID: <87r1r2kh77.fsf@pm.me> (raw)

[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See


Your bug report will be posted to the Org mailing list.


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

;; Old
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward "^\\*+ .*?\\(\\[#\\(.\\)\\]\\)" limit t)
(match-beginning 1) (match-end 1)
(list 'face (org-get-priority-face (string-to-char (match-string 2)))
'font-lock-fontified t))))

;; New
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward org-priority-regexp limit t)
(match-beginning 1) (match-end 1)
(list 'face (org-get-priority-face (string-to-char (match-string 2)))
'font-lock-fontified t))))

(defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]+\\)\\] ?\\)"

Removing space before last question mark fixes my problem, but I'm not
sure it won't affect something.[org-mode-priority-9.3.8.png][org-mode-priority-9.4.png]

Emacs : GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
of 2020-08-11
Package: Org mode version 9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)

[-- Attachment #2.1: Type: text/html, Size: 2371 bytes --]

[-- Attachment #2.2: org-mode-priority-9.4.png --]
[-- Type: image/png, Size: 5121 bytes --]

[-- Attachment #2.3: org-mode-priority-9.3.8.png --]
[-- Type: image/png, Size: 5315 bytes --]

             reply	other threads:[~2020-09-16  4:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 18:50 Roman Rudakov [this message]
2020-09-16  8:52 ` 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
2020-09-29  8:00   ` Roman Rudakov
2020-10-04 14:36     ` Protesilaos Stavrou
2020-10-11  6:40       ` Kyle Meyer
2020-10-12  6:48         ` Protesilaos Stavrou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1r2kh77.fsf@pm.me \
    --to=rrudakov@pm.me \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).