GNU bug report logs - #78861
[PATCH] Avoid calendar flicker

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Sun, 22 Jun 2025 07:01:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78861: closed ([PATCH] Avoid calendar flicker)
Date: Sat, 28 Jun 2025 09:54:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 28 Jun 2025 12:53:30 +0300
with message-id <86a55s6vl1.fsf <at> gnu.org>
and subject line Re: bug#78861: [PATCH] Avoid calendar flicker
has caused the debbugs.gnu.org bug report #78861,
regarding [PATCH] Avoid calendar flicker
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78861: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78861
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Avoid calendar flicker
Date: Sun, 22 Jun 2025 09:00:02 +0200
[Message part 3 (text/plain, inline)]
Tags: patch

Hi,

When you have diary marks activated in the calendar (with 'm',
diary-mark-entries) and when moving around (for example with '<' and
'>') you will see some flicker on dates where you have marks.  This
patch fixes this.



In GNU Emacs 31.0.50 (build 7, x86_64-unknown-openbsd7.7) of 2025-06-21
 built on computer
Repository revision: c916f816e0f12f876868f9ffa1be4b070933bb6f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: OpenBSD computer 7.7 GENERIC.MP#23 amd64

Configured using:
 'configure CC=egcc CPPFLAGS=-I/usr/local/include
 LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
 --bindir=/home/manuel/bin --with-x-toolkit=no
 --with-toolkit-scroll-bars=no --without-cairo --without-dbus
 --without-gconf --without-gsettings --without-compress-install'

[0001-Avoid-calendar-flicker.patch (text/patch, attachment)]
[Message part 5 (text/plain, inline)]
-- 
Manuel Giraud
[Message part 6 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 78861-done <at> debbugs.gnu.org
Subject: Re: bug#78861: [PATCH] Avoid calendar flicker
Date: Sat, 28 Jun 2025 12:53:30 +0300
> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> Cc: 78861 <at> debbugs.gnu.org
> Date: Mon, 23 Jun 2025 09:50:23 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> >> Cc: 78861 <at> debbugs.gnu.org
> >> Date: Sun, 22 Jun 2025 18:22:15 +0200
> >> 
> >> Eli Zaretskii <eliz <at> gnu.org> writes:
> >> 
> >> >> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> >> >> Cc: 78861 <at> debbugs.gnu.org
> >> >> Date: Sun, 22 Jun 2025 16:08:37 +0200
> >> >> 
> >> >> Eli Zaretskii <eliz <at> gnu.org> writes:
> >> >> 
> >> >> > If the above is the best scenario you can offer, then please point me
> >> >> > to the code in calendar that first draws the numbers in black and then
> >> >> > redraws them in red, and I will take a look.
> >> >> 
> >> >> Thanks Eli.  I think most takes place in `diary-mark-entries' at
> >> >> diary-lib.el:1377.
> >> >
> >> > Thanks.  Then I guess the problem is the calls to sit-for, which
> >> > performs redisplay, in calendar-generate-window before it calls
> >> > diary-mark-entries.  Any idea why we are calling sit-for there?  If
> >> > you remove those calls or add the optional second argument non-nil to
> >> > them, does the problem go away?
> >> 
> >> Thanks.  I have commented both sit-for and the issue completely goes
> >> away.  I dig into history and those sit-for are here from ecaa0527104b
> >> (the initial revision in 1992!)
> >
> > Can you (or anyone else) think of any reasons to have these sit-for
> > calls there?  For example, when there's no need to call
> > diary-mark-entries at all?
> 
> Both sit-for are guarded behind a `in-calendar-window' meaning that the
> window-buffer is the calendar buffer.  So maybe the explanation for
> those sit-for was to have some interactive visual feed back when
> activating marks of diary entries.  But now that we could end up calling
> `dairy-mark-entries' when we scroll this just creates too much flicker,
> IMO.
> 
> > If we can think of no valid reason, I think TRT is simply to remove
> > these calls.  It's possible that this was there for when Emacs had a
> > completely different way of fontifying buffers than what we have now.
> 
> Here is an updated patch that removes those sit-for.

Thanks, installed on the master branch, and closing the bug.


This bug report was last modified 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.