unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#69271: 30.0.50; Strange interaction between :inverse-video overlay face and calendar today face
@ 2024-02-19 12:14 Ihor Radchenko
  2024-02-20 16:08 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2024-02-19 12:14 UTC (permalink / raw)
  To: 69271

Originally reported in
https://list.orgmode.org/orgmode/CALEYq09=JKfzRY26fohLPYz7_2mnvhg_LGsjnQwQKov5SbqkYg@mail.gmail.com/

Steps to reproduce:

1. emacs -Q
2. Insert the following code into *scratch* buffer


(defface yant/test '((t :foreground "red" :weight bold)) "")
(defface yant/test-inv '((t :foreground "red"  :inverse-video t)) "")
(require 'calendar)

;; (dotimes (_ 5)
;;   (let* ((mark-calendar
;; 	  (lambda ()
;; 	    (calendar-mark-visible-date
;; 	     (read (format-time-string "(%m %d %Y)"))
;; 	     'yant/test)))
;; 	 (calendar-today-visible-hook))
;;     (add-hook 'calendar-today-visible-hook mark-calendar)
;;     (calendar)
;;     (setq cursor-type nil)
;;     (let ((ov (make-overlay (1- (point)) (1+ (point)))))
;;       (overlay-put ov 'face 'yant/test-inv)))
;;   (read-char "Observe overlay obeying inverse-video. Press any key")
;;   (kill-buffer calendar-buffer))
(dotimes (_ 50)
  (let* ((mark-calendar
	  (lambda ()
	    (calendar-mark-visible-date
	     (read (format-time-string "(%m %d %Y)"))
	     (list :foreground "red" :weight 'bold))))
	 (calendar-today-visible-hook))
    (add-hook 'calendar-today-visible-hook mark-calendar)
    (calendar)
    (setq cursor-type nil)
    (let ((ov (make-overlay (1- (point)) (1+ (point)))))
      (overlay-put ov 'face 'yant/test-inv)))
  (read-char "Observe overlay sometimes *not* obeying inverse-video. Press any key")
  (kill-buffer calendar-buffer))

3. M-x eval-buffer <RET>
4. Observe today date in the calendar fontified inconsistently as the
   code is executed multiple times.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-02-18 built on localhost
Repository revision: 951379a0983ea66b1396d07628bb726f033ea24b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Gentoo Linux

Configured using:
 'configure JAVAC=/etc/java-config-2/current-system-vm/bin/javac'

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-21 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19 12:14 bug#69271: 30.0.50; Strange interaction between :inverse-video overlay face and calendar today face Ihor Radchenko
2024-02-20 16:08 ` Eli Zaretskii
2024-02-21 11:18   ` Ihor Radchenko
2024-02-21 12:05     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).