emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug] 'org-font-lock-extra-keywords' appear next to the parent headi


From: Philipp Kiefer
Subject: Re: [Bug] 'org-font-lock-extra-keywords' appear next to the parent heading when its subtree is folded.
Date: Tue, 24 Jan 2023 18:37:48 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1


On 24.01.2023 12:34, Ihor Radchenko wrote:
Philipp Kiefer <phil.kiefer@gmail.com> writes:

Org mode version 9.6.1, GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)

Please see the two screenshots here for illustration:

https://imgur.com/a/7EuUi0J <https://imgur.com/a/7EuUi0J>

(I'm assuming it's not a good idea - or not even possible - to send 
e-mail attachments to the list?)
Quite the opposite - attachments are preferred when they do not have
large size. With attachments, the thread can be understood by the
readers years later, when whichever image hosting you use dwindles.

Great, attaching the screenshots in question. Also attaching an .org file illustrating the previously reported bug plus another related (and more serious as it impedes org functionality) one.


This is the relevant code from my init.el that seems to be causing this 
issue:

(require 'org-habit nil t) ; relevant?
(defun org-add-my-extra-fonts ()
   "Add alert and overdue fonts."
   (add-to-list 'org-font-lock-extra-keywords 
'("\\(³\\)\\([^\n\r\t]+\\)\\(³\\)" (1 '(face org-habit-alert-face 
invisible nil)) (2 'org-habit-alert-face t) (3 '(face 
org-habit-alert-face invisible nil))) t)
You set 'invisible text property to nil, which tells Emacs - make the
text visible. Emacs obeys.

Well, with Orgmode version 9.5, Emacs was never *this* obedient, i. e. this problem only began after I updated Orgmode to 9.6, which is why I considered it a bug in the first place. I am aware I have set the keywords to be visible but would not expect them to appear at the end of the parent heading for a folded subtree! (see the screenshots and the explanatory .org file). Showing them there does not make any sense in my opinion. I would expect Orgmode to hide these keywords when they are in a collapsed subtree, regardless of the 'invisible text' setting, which is how it was handled pre 9.6 unless I'm much mistaken.

The other bug illustrated in the .org file (also requiring specific settings, see the init.el section in the file) breaks 'org-previous-visible-heading' and probably some other upwards motion commands in connection with parent items having  emphasis markers as well as subitems.

Attachment: jpgKCxDe8kNuP.jpg
Description: JPEG image

Attachment: jpg26uOqzaZfo.jpg
Description: JPEG image

Attachment: bugs illustrated and explained.org
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]