org-read-date-display: Fix random overlay priority when selection is at today

* lisp/org.el (org-read-date-display): Assign `org-read-date-overlay'
non-default priority.  This makes sure that the overlay is displayed
over the overlay that calendar.el puts to indicate "today".

Reported-by: John Kitchin <jkitchin@andrew.cmu.edu>
Link: https://orgmode.org/list/CALEYq0-xbCc6ayEK3v7tKnuGU7=Npgh3raEjuB13qOTN6Eu07Q@mail.gmail.com
This commit is contained in:
Ihor Radchenko 2024-02-21 14:15:24 +03:00
parent b3b35b03ff
commit 67d9372487
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 0 deletions

View File

@ -14074,6 +14074,9 @@ user."
(setq txt (concat txt " (=>F)")))
(setq org-read-date-overlay
(make-overlay (1- (line-end-position)) (line-end-position)))
;; Avoid priority race with overlay used by calendar.el.
;; See bug#69271.
(overlay-put org-read-date-overlay 'priority 1)
(org-overlay-display org-read-date-overlay txt 'secondary-selection)))))
(defun org-read-date-analyze (ans def defdecode)