From unknown Fri Aug 15 01:56:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#78861 <78861@debbugs.gnu.org> To: bug#78861 <78861@debbugs.gnu.org> Subject: Status: [PATCH] Avoid calendar flicker Reply-To: bug#78861 <78861@debbugs.gnu.org> Date: Fri, 15 Aug 2025 08:56:51 +0000 retitle 78861 [PATCH] Avoid calendar flicker reassign 78861 emacs submitter 78861 Manuel Giraud severity 78861 normal tag 78861 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 03:00:42 2025 Received: (at submit) by debbugs.gnu.org; 22 Jun 2025 07:00:42 +0000 Received: from localhost ([127.0.0.1]:46314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTEh0-00067P-A8 for submit@debbugs.gnu.org; Sun, 22 Jun 2025 03:00:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42040) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTEgv-00066v-UE for submit@debbugs.gnu.org; Sun, 22 Jun 2025 03:00:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTEga-0007zp-1K for bug-gnu-emacs@gnu.org; Sun, 22 Jun 2025 03:00:18 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTEgU-0004JP-1W for bug-gnu-emacs@gnu.org; Sun, 22 Jun 2025 03:00:13 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=krH4q73x HjJKOJsrHLsp9+leGdHmCncEuiFMx8Iywq0=; h=date:subject:to:from; d=ledu-giraud.fr; b=xJY1i4cgp7+2lJ9x0mER3/uOvsYFv7GXy3j72Bs33JornFz23n CPAzblFkowccacCHAGFSpma7BdIge2v7ikBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=krH4q73xHjJKOJsr HLsp9+leGdHmCncEuiFMx8Iywq0=; h=date:subject:to:from; d=ledu-giraud.fr; b=xZnXJ+n8fRG5JaD0HPMKyN6EZ5gK0QZYS/6fRfIei8ddaBpgzq SgxEWlNg8vke7MbElm9jp/5ubxS+eoa9aQUIJ4iLzg0k1hVHdz7ZNqWz1X3a1us6f7YmLi eHTI6aK3BHXxzayPAYnHadxzFExKDZBegqCFfIAOGrc069l4jq5gxrBb2IVqHv+8ebRxxX 6+SNw6culTd5cf7BRHc6MbinymvCPAcxKvoezhOVBojdFHkdUMGi5667moWfmNpcV6Rgr1 VO1bJM1r5oqDiMySHVHiHLP/kPjusJhJ6jNxQsMf3/JFltdgOCcaKdDIjRekC+blbn/IHb rqKAQsdbc65A== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id b99999b6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sun, 22 Jun 2025 09:00:04 +0200 (CEST) From: Manuel Giraud To: bug-gnu-emacs@gnu.org Subject: [PATCH] Avoid calendar flicker X-Debbugs-Cc: Date: Sun, 22 Jun 2025 09:00:02 +0200 Message-ID: <87ecvc45xp.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain 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' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Avoid-calendar-flicker.patch >From c08730525810adc5f7cbe196e86c707ca4fc98cc Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Sun, 22 Jun 2025 08:53:12 +0200 Subject: [PATCH] Avoid calendar flicker * lisp/calendar/calendar.el (calendar-generate-window): Inhibit redisplay when building the calendar window. --- lisp/calendar/calendar.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 1c98de98b9b..47b6b512370 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1410,7 +1410,8 @@ calendar-basic-setup (defun calendar-generate-window (&optional mon yr) "Generate the calendar window for the current date. Optional integers MON and YR are used instead of today's date." - (let* ((inhibit-read-only t) + (let* ((inhibit-redisplay t) + (inhibit-read-only t) (today (calendar-current-date)) (month (calendar-extract-month today)) ;; (day (calendar-extract-day today)) -- 2.49.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 03:25:29 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 07:25:29 +0000 Received: from localhost ([127.0.0.1]:46376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTF4z-0007HG-7G for submit@debbugs.gnu.org; Sun, 22 Jun 2025 03:25:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40758) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTF4x-0007Gy-5T for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 03:25:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTF4q-0000kW-5v; Sun, 22 Jun 2025 03:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nJZxfyTarYgWpH0RBqyqnvk4H63X3uBNFFY8nTre50M=; b=htXAAZ0+/Pdg KPhWhwvkKTmnvK2ydWHIplymyixGPm2OuyQ5NC8/w8Jw+tJ1NgPlREoTRW4SRHQAE2a4M9xWicV42 GRKwdSdbvN+ccYf35v2gNKGWgqdYUfsJe8sCyfCPrkmk9hVw5YtP+2WM7B+nWPc3F+GTCT64cNp6h 5tyI7xCU00tX5A033kNQArt862SX8C8uBbUiRPxc1EugL1KxUu8yOGMXXqM21kQkVqrmH4AS/MqWm 2w9INuEnGVTx6hpGC2NNk5HGeEjx/nk1zLPnoCWgp6SwJH189rTDtvv/kSnZLeuIvXa7QUaYJGWHN 0cHrRscx68zjW+SNgbp7cQ==; Date: Sun, 22 Jun 2025 10:25:17 +0300 Message-Id: <86qzzcgrvm.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87ecvc45xp.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sun, 22 Jun 2025 09:00:02 +0200) Subject: Re: bug#78861: [PATCH] Avoid calendar flicker References: <87ecvc45xp.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Date: Sun, 22 Jun 2025 09:00:02 +0200 > > 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. Please elaborate: which part(s) of the display flicker? I tried a simple recipe to reproduce the problem, and saw no flickering on my system. Did you see the flickering in "emacs -Q"? And what is the state of double-buffering in the session where you saw it? > This patch fixes this. Sorry, the inhibit-redisplay flag is not meant to be used for these purposes, so this patch is not TRT, from where I stand. We need instead to understand why the display flickers and fix that to avoid the flickering. So let's please take a step back and try to come up with a reproducible recipe that exhibits this flickering, and then see why it happens. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 07:46:34 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 11:46:34 +0000 Received: from localhost ([127.0.0.1]:47026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTJ9d-0000AC-Oo for submit@debbugs.gnu.org; Sun, 22 Jun 2025 07:46:34 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:48658) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTJ9b-00009c-4i for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 07:46:32 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=GN5McfCv j7LpFi1002qt+V0xWj+G7rzaJDo3nOqlN1M=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=T/Xx5StzoVGXKrdE6L2uHYtXqP3j95 BM8HkIx/Vyo/RdGDmkLO6BZgZi7lJ2Y5DZwguyjuYmlmbfW0rSnzVxCQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=GN5McfCvj7LpFi10 02qt+V0xWj+G7rzaJDo3nOqlN1M=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=aC9J3XzSMJZpAXBZos1w/fA6mKn1yv/zB/CX5v 8ilG4X461y/bEbmeICJ+wzLyZbXaDMqzgWrCnmB7o2BnkZF8bCCrTn/jg61F6tE7FEJLy6 79bxvl068DhRHcXas4QzCvyK1A0rTTZqJaQNFAY1Jlj+50vlmTggNNdOB+z6pMfeAN6uk0 Yg5/z7enAVf+0r9yPuxar71NM9+pikThuPuZJr6XaNt7gSEMpFjlY9aodkZlJZHDKmPcrm ZPC0QRvbsB7CZfa8Xr9854FisD7CrQ8R4R8h9ZMUNpIfa52FSw/tGIL2Ur0SqXSD80290X RZdGYSMDar8erySWtD1TfpxQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id fe4c95a8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 22 Jun 2025 13:46:29 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#78861: [PATCH] Avoid calendar flicker In-Reply-To: <86qzzcgrvm.fsf@gnu.org> References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> Date: Sun, 22 Jun 2025 13:46:28 +0200 Message-ID: <87cyaw6lt7.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Manuel Giraud >> Date: Sun, 22 Jun 2025 09:00:02 +0200 >> >> 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. > > Please elaborate: which part(s) of the display flicker? I tried a > simple recipe to reproduce the problem, and saw no flickering on my > system. I see the date digits flicker when moving: the digits glimpse in black before turning to red (with default theme). > Did you see the flickering in "emacs -Q"? Here is a recipe: - emacs -Q - Open "/tmp/diary" and insert the following content: --8<---------------cut here---------------start------------->8--- %%(diary-block 6 22 2025 8 30 2025) Looong break --8<---------------cut here---------------end--------------->8--- - M-: (setq diary-file "/tmp/diary") - M-x calendar - Hit 'm' and then alternatively '>' and '<' to see the flicker > And what is the state of double-buffering in the session where you saw > it? I'm not sure but I think I'm good. Here's an excerpt of xdpyinfo: number of extensions: 28 BIG-REQUESTS Composite DAMAGE DOUBLE-BUFFER DPMS DRI2 DRI3 GLX Generic Event Extension MIT-SCREEN-SAVER MIT-SHM Present RANDR RECORD RENDER SECURITY SHAPE SYNC X-Resource XC-MISC XFIXES XFree86-DGA XFree86-VidModeExtension XINERAMA XInputExtension XKEYBOARD XTEST XVideo default screen number: 0 number of screens: 1 >> This patch fixes this. > > Sorry, the inhibit-redisplay flag is not meant to be used for these > purposes, so this patch is not TRT, from where I stand. We need > instead to understand why the display flickers and fix that to avoid > the flickering. So let's please take a step back and try to come up > with a reproducible recipe that exhibits this flickering, and then see > why it happens. Ok. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 09:06:06 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 13:06:07 +0000 Received: from localhost ([127.0.0.1]:47468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTKOZ-0004bq-AT for submit@debbugs.gnu.org; Sun, 22 Jun 2025 09:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56360) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTKOU-0004aK-EJ for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 09:06:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTKOO-0003xk-Ci; Sun, 22 Jun 2025 09:05:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=PDdZdNyqI+nPKV3G6/1pGXrNRn3v/ykJ+4P8OZ/Sbh4=; b=fz32IGcVlCJI ZSvxDJWp5BHL5HqLoy5U3lbFJNbiOiUkKN9tXcspNMpVgtkQXr9389oDPrMRu1czNFHPND71vE6s5 em+ufUu7tveSXtXkIo3Te720M+qdzUuaXrxgS9Yxwje87xDni98AGdVqFCLkTXj68GR8vH0NUTX/I b5tRJMVGVueGoyxiYzjSf3q8Y56LyoFf5U9lhY0W+MWUfGUBKG3UlOOPJWS/x1EWqLNPxqSx3e2DN FUWgQU9CuCT22FkjwpkdMS9BwQ5M1KuSgTvRUmZdkDDkAWcQqo0GQHfF+Or4YHNLwilY8Ur5LpOto ZdoZEGmfuq5QyM1uv/UraQ==; Date: Sun, 22 Jun 2025 16:05:50 +0300 Message-Id: <86bjqggc41.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87cyaw6lt7.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sun, 22 Jun 2025 13:46:28 +0200) Subject: Re: bug#78861: [PATCH] Avoid calendar flicker References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: 78861@debbugs.gnu.org > Date: Sun, 22 Jun 2025 13:46:28 +0200 > > Eli Zaretskii writes: > > >> From: Manuel Giraud > >> Date: Sun, 22 Jun 2025 09:00:02 +0200 > >> > >> 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. > > > > Please elaborate: which part(s) of the display flicker? I tried a > > simple recipe to reproduce the problem, and saw no flickering on my > > system. > > I see the date digits flicker when moving: the digits glimpse in black > before turning to red (with default theme). I don't see anything like that here. > Here is a recipe: > - emacs -Q > - Open "/tmp/diary" and insert the following content: > --8<---------------cut here---------------start------------->8--- > %%(diary-block 6 22 2025 8 30 2025) Looong break > --8<---------------cut here---------------end--------------->8--- > - M-: (setq diary-file "/tmp/diary") > - M-x calendar > - Hit 'm' and then alternatively '>' and '<' to see the flicker I see the entire window being redrawn, so it's hard to see a flicker. Seeing flickering requires that everything stays the same and in the same position in the window, otherwise it's impossible to say that there's flickering when everything moves and changes. 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. > > And what is the state of double-buffering in the session where you saw > > it? > > I'm not sure but I think I'm good. Here's an excerpt of xdpyinfo: No, I meant whether your build is with double-buffering? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 09:55:48 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 13:55:48 +0000 Received: from localhost ([127.0.0.1]:47658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTLAf-0003ZY-Bt for submit@debbugs.gnu.org; Sun, 22 Jun 2025 09:55:47 -0400 Received: from mout.gmx.net ([212.227.17.21]:41391) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTLAX-0003X0-N2 for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 09:55:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1750600527; x=1751205327; i=stephen.berman@gmx.net; bh=Zwd0N39iCuucJ2WIieZ49umfyHNo5LDDaDttAQq2YSE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=olKfvIBQGoUYk+GC0IZUUhXIa5H8072BMQIILdROrJBOO1uey6bIuLOds8IafwWo iJVOPoMUWJlMMbIWld1K6Wz2EFGVqygLy0cAvMxvj9WL5S7DyowrIzTIsx03XHqr2 rSHIWFOcXYBJ0Qi/XQQXjthuyICzPA43Cl3uVcx4y6S6mDQeJW9GrUyBzdvlNHaKO kz3+dOnEw/MM/R5pjEvGUSpyU89gp3VljtQuyGi7g0zy+X7Vc+G6kpFTW/jsyFLNo Bik+wDvKqX8xkXYLcdDvDHfQbNgRAdK5mbqeT6HJbmmz38jhOEK7R+IQezVfmXIbn KLtEWSpIg+7bxGcCiw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.165]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQMyf-1u7hYE0Y7N-00WR8t; Sun, 22 Jun 2025 15:55:27 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#78861: [PATCH] Avoid calendar flicker In-Reply-To: <86bjqggc41.fsf@gnu.org> References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> Date: Sun, 22 Jun 2025 15:55:26 +0200 Message-ID: <87wm93nanl.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:vZ8MHedTYDRLq9Kluc2fLiB6GED4IXwE9GbWaQiNKtxWi9mm4WB RLUys7MVIUoBQH7UoK467iQvIX1gdL36MGEZjTrkSoccW97j/kAnFHeJAruiUJ6IF1WdOaz pE2Rh/kM0ZkBTlHr06h552YM1npiKVmAbZPBbHx4+7a4tDQU24XoweJqNnNZyBvsk0OQJQh TkvGEnvRv27b8ZlkV4yqg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:jNLWqUBn1Q0=;LgP4bLmAq5Y2nn4lXGEb4MAOvbd DOIWYRS9bP3AtyYalNFSy+e1uNjK2T3YdLjbL0RLYSnrQO2nYlkCzPlrTG+orxTO01pZIysSH 2gSgQkTHHverBsiUkdfCkMc6YtR6fVdnSA9GaIQKXOfHOVHtOCvav4qcWdSgxLPj+dfbkbNqM qkFHy5zl1rALU78MNCMh+sYMmLMZ5E5fOaodIYeUoFtB01CCQPdCTF/CINNCQ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xuT+4PLltX0jAYLoqd/U4+vVX6QntJCt46D4N50B1qVcTJRqbxXZ7o2mj fmoXbl0iuy4YKVBk9AD8h+K2j65ire4UXLtLtf7iRM9DDqtY7nQcnJCPIkGpntqZKDeKAguIy OzVGos2veYnaCN04YeDUMU/4i1IpwuhYpsRAUOPSilZ8Oa5WJiKP97DxpDbLtNON5TlGUQowi +UIchJjm4Q1AS995LKM85fDrt9WzIXoduYyFIUt74u29/AB5gWvnXiSPpSkM3jvwMbP/qAr2k engqIy9jI4suCjMEVbcPu5WuNU7t2kZYpbyPW8HzEhW46hOHET7Sz33535CThCa4OmHQ22TSn 1fzKu9jfGkxI0U5LxdZCohvrrPonDRBjHKE9Y6VOgO8HoqwTOtD1vZ0BCOxQk0dlIR48IIQ9C FNfzJDXcuwAzS2Kb5vkpf56/mcWdy6aguSaI48MHv7JLotLYm8o+EZdv9feP2x67XErtTiAZ3 6sZhYke10yA5fe6VK3RUIrUCszAZsVETjSH4uLJmneOUkLbpE83cGDk8vF7xpKbGNFvs/v07Q iOvamgBnm4ltjbcB9wOInJ5ICdAvHmx1fNYrkVniIsiyawWrR95zxTf2qGuatAKFiNNOVSQVo n8iCtdiXlW+VeMFr6Ngsew0/wDVSSdEscWY2uvAGqKTh3AZmW646WVBL4D/jdZb9eE2J8sAjz Tlp9rG0HINpiZ+qKMRqERlHcLumtHuFSOtfnpNFOcBFGC3ljiNTaIesNhMDvUrwtWbHsA8lCr 21DGCOUWBC/0zPee2D9QGfpNC892I3nwNkcPgFUquYTEEhGMNO009UwCrTCrjnUXezuA7O892 IaYJt5fBNFLCUwTu/ockgYmQz Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78861 Cc: Manuel Giraud , 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, 22 Jun 2025 16:05:50 +0300 Eli Zaretskii wrote: >> From: Manuel Giraud >> Cc: 78861@debbugs.gnu.org >> Date: Sun, 22 Jun 2025 13:46:28 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> >> From: Manuel Giraud >> >> Date: Sun, 22 Jun 2025 09:00:02 +0200 >> >>=20 >> >> 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. >> > >> > Please elaborate: which part(s) of the display flicker? I tried a >> > simple recipe to reproduce the problem, and saw no flickering on my >> > system. >>=20 >> I see the date digits flicker when moving: the digits glimpse in black >> before turning to red (with default theme). > > I don't see anything like that here. > >> Here is a recipe: >> - emacs -Q >> - Open "/tmp/diary" and insert the following content: >> --8<---------------cut here---------------start------------->8--- >> %%(diary-block 6 22 2025 8 30 2025) Looong break >> --8<---------------cut here---------------end--------------->8--- >> - M-: (setq diary-file "/tmp/diary") >> - M-x calendar >> - Hit 'm' and then alternatively '>' and '<' to see the flicker > > I see the entire window being redrawn, so it's hard to see a flicker. > Seeing flickering requires that everything stays the same and in the > same position in the window, otherwise it's impossible to say that > there's flickering when everything moves and changes. > > 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. I don't see any flickering or redrawing with that recipe, but in my calendar and diary configuration I do see what looks like delayed fontification of certain date marking. I've narrowed the issue down to a combination of marking lunar phases and having a sufficiently large number of diary entries (in my case due to including several todo-mode files). Here is a recipe: 0. Make ~/.emacs.d/diary consist of the following lines: =2D------------------------------ %%(diary-lunar-phases 'warning) Jun 22, 2025 test =2D------------------------------ and then repeat the second line a large number of times (5000 shows the issue clearly on my machine, 1000 shows it too, but not as clearly). 1. emacs -Q 2. M-x calendar 3. Hit 'm' and then alternatively '>' and '<'. On typing 'm' there is a noticeable delay before the dates are marked, on the first scroll command also a noticeable delay but not as long, on subsequent scroll commands much less delay but enough to see the dates first with default face, then change to warning face. With Manuel's patch let-binding 'inhibit-redisplay', there are still delays when scrolling but the lunar phase dates are shown in warning face as soon as the scroll happens. >> > And what is the state of double-buffering in the session where you sa= w >> > it? >>=20 >> I'm not sure but I think I'm good. Here's an excerpt of xdpyinfo: > > No, I meant whether your build is with double-buffering? Here (GNU/Linux) `M-: (x-double-buffered-p)' returns t. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 10:08:45 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 14:08:46 +0000 Received: from localhost ([127.0.0.1]:48943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTLNE-0005ke-Sl for submit@debbugs.gnu.org; Sun, 22 Jun 2025 10:08:45 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:8405) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTLNA-0005kH-U0 for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 10:08:42 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=dJTYMHUN MxD6PNAAhLYqj+TjY4Nm6R98FjORw+drxqE=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=YGZNrvXAP6btmivyltStjEbNdPxnSd QMtR1ZqIHEamYr4JWpDukc0hIjTlbvXN0wFPQwBrHLIoBqjdUHJhEAAA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=dJTYMHUNMxD6PNAA hLYqj+TjY4Nm6R98FjORw+drxqE=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=vGpj0G9HbvEAzSM8oOn0Jdc3UlUv8VF4vjkyBO LIBgDcsWfVDL0n2wzLj+d4aFHfkWbnq4z3EfjZ0AhIGgNTlymqqIjsqB1hhyihqO/ZhtsS be5LY6lQdvAQRDEMGTNx3mbNCgNBsk2eTmA5rQByoI1HXBKHizFj5ayeGlRCflvnjGU4g/ S7Z2AQqQ/TgyAGaggX3tVwc4wdvx4bVzgej7KOc9XBXAVneZj19m6sjP7SNtLvDT8cuR1e Zf8SMEYS+G16jCyY6ohTWoQIo9fEf1B9O/FM1tAQxyRDzoOqxaZWceGU4QuGFELTHfzvF6 z16Ff+uTjc1bCMfz9GxApZdQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 1b0f4c4b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 22 Jun 2025 16:08:39 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#78861: [PATCH] Avoid calendar flicker In-Reply-To: <86bjqggc41.fsf@gnu.org> References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> Date: Sun, 22 Jun 2025 16:08:37 +0200 Message-ID: <878qlj7tsq.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: 78861@debbugs.gnu.org >> Date: Sun, 22 Jun 2025 13:46:28 +0200 >> >> Eli Zaretskii writes: >> >> >> From: Manuel Giraud >> >> Date: Sun, 22 Jun 2025 09:00:02 +0200 >> >> >> >> 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. >> > >> > Please elaborate: which part(s) of the display flicker? I tried a >> > simple recipe to reproduce the problem, and saw no flickering on my >> > system. >> >> I see the date digits flicker when moving: the digits glimpse in black >> before turning to red (with default theme). > > I don't see anything like that here. > >> Here is a recipe: >> - emacs -Q >> - Open "/tmp/diary" and insert the following content: >> --8<---------------cut here---------------start------------->8--- >> %%(diary-block 6 22 2025 8 30 2025) Looong break >> --8<---------------cut here---------------end--------------->8--- >> - M-: (setq diary-file "/tmp/diary") >> - M-x calendar >> - Hit 'm' and then alternatively '>' and '<' to see the flicker > > I see the entire window being redrawn, so it's hard to see a flicker. > Seeing flickering requires that everything stays the same and in the > same position in the window, otherwise it's impossible to say that > there's flickering when everything moves and changes. Fair enough. Here is (maybe) another way to see this flickering I'm seeing: same first four points of the recipe and then you could hit 'm' repeatedly. Nothing should move but I still see a flicker. > 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. >> > And what is the state of double-buffering in the session where you saw >> > it? >> >> I'm not sure but I think I'm good. Here's an excerpt of xdpyinfo: > > No, I meant whether your build is with double-buffering? I think so. I don't think I use any build option that could inhibit this. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 10:38:27 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 14:38:28 +0000 Received: from localhost ([127.0.0.1]:49120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTLpy-00028b-9Z for submit@debbugs.gnu.org; Sun, 22 Jun 2025 10:38:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35012) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTLpt-00026s-JO for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 10:38:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTLpo-00056c-2K; Sun, 22 Jun 2025 10:38:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S5kwi7KHPJeY+GeZSmvznXQVC5XRNl5+ozdAe45+lZc=; b=efV7QKAUmOYH 8jTwAaMXw5OkQ+EvjLCe6TOLyCUYKzqCDDJ8mdfK8aVESFR8uLDGSDt0MhLc5HfsGPeCsIemoKxNX X+u58TuRR3CGRLbtxrpw/AHgQ0HpVppEVnQ2zJE8GfhcW67GGl4Ymlp43habt03x/3F+9DrgEWUK6 cBVq4b013/Vq3GL/xTh/vPLWVor/A31Co5AQ75MLR2Qt78pGwpnIrJH8IK2eq7zUvmlWNBm2KIhwP DNpZtwwM+7NQinaimTAmdC7KvzgX2belR15UwZ47ju1H97OhIoiKI9s8Y4xPC+Do1/5PkEIvQoRCF RsYmJkjxHcQSArukcNDNXg==; Date: Sun, 22 Jun 2025 17:38:12 +0300 Message-Id: <867c13hmej.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <87wm93nanl.fsf@gmx.net> (message from Stephen Berman on Sun, 22 Jun 2025 15:55:26 +0200) Subject: Re: bug#78861: [PATCH] Avoid calendar flicker References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <87wm93nanl.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78861 Cc: manuel@ledu-giraud.fr, 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: Manuel Giraud , 78861@debbugs.gnu.org > Date: Sun, 22 Jun 2025 15:55:26 +0200 > > I don't see any flickering or redrawing with that recipe, but in my > calendar and diary configuration I do see what looks like delayed > fontification of certain date marking. I've narrowed the issue down to > a combination of marking lunar phases and having a sufficiently large > number of diary entries (in my case due to including several todo-mode > files). Here is a recipe: > > 0. Make ~/.emacs.d/diary consist of the following lines: > ------------------------------- > %%(diary-lunar-phases 'warning) > Jun 22, 2025 test > ------------------------------- > and then repeat the second line a large number of times (5000 shows the > issue clearly on my machine, 1000 shows it too, but not as clearly). > 1. emacs -Q > 2. M-x calendar > 3. Hit 'm' and then alternatively '>' and '<'. > > On typing 'm' there is a noticeable delay before the dates are marked, > on the first scroll command also a noticeable delay but not as long, on > subsequent scroll commands much less delay but enough to see the dates > first with default face, then change to warning face. With Manuel's > patch let-binding 'inhibit-redisplay', there are still delays when > scrolling but the lunar phase dates are shown in warning face as soon as > the scroll happens. Is this an interesting case? Do people frequently have thousands of such lines in their ~/diary files? Anyway, what triggers the fontifications that are evidently done after the initial display? Are there any timers involved, perhaps? IOW, why isn't the buffer fontified immediately? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 10:44:06 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 14:44:07 +0000 Received: from localhost ([127.0.0.1]:49150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTLvR-00036l-3N for submit@debbugs.gnu.org; Sun, 22 Jun 2025 10:44:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43628) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTLvO-000353-Cv for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 10:44:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTLvJ-0006Gp-2O; Sun, 22 Jun 2025 10:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kemsx9a5E/yF2dpVSjENYoTmW//ihfyq1rh+nLjpKNg=; b=irWA/g7IeX2F J92V7ihUt4RPsykQkWzObR8vTcAjDpZXTNhh4XQytdIe5r7cj2Uav7yYOyaRmL+lXNDLWo1K7arWz JwaDOXMQNEMPR2Z6pyGHjDUBSzdc1NPyu6M8NGUUO6xI1YQHh993OFkWJvgyTj+fbYAgBFIbllEXY pvb9OxFUBvyQyO5ANSXxcOge46xdlW1ZYVUmvSQOGSMW0WmCQMWrlu0JL1z/bgtzeBGRzXbesIyJv gRgrIHpNto70lrzrrAB/mYPjYh9vh35txW+2Z/MAve7A9FGRh2PrjzN2JclDnHlQglw93GOD/AnIf nSU4gPZvtXcjaV3JF2EEsg==; Date: Sun, 22 Jun 2025 17:43:36 +0300 Message-Id: <865xgnhm5j.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <878qlj7tsq.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sun, 22 Jun 2025 16:08:37 +0200) Subject: Re: bug#78861: [PATCH] Avoid calendar flicker References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <878qlj7tsq.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: 78861@debbugs.gnu.org > Date: Sun, 22 Jun 2025 16:08:37 +0200 > > Eli Zaretskii 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? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 12:22:23 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 16:22:24 +0000 Received: from localhost ([127.0.0.1]:49583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTNSY-000367-Ik for submit@debbugs.gnu.org; Sun, 22 Jun 2025 12:22:23 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:10401) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTNSV-00035D-BF for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 12:22:20 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=/PtdFVgw Zp4uJxlZYkIMGyDoLkTg2athfnzXaRrTyt0=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=hjJbXf63Fu4dVv+8Ba66/WN03Relpu NNsW59HizYu5K7FzLlRfBpOXwt9Ep6wrQIxufnHuz++K2blADWuuEGCA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=/PtdFVgwZp4uJxlZ YkIMGyDoLkTg2athfnzXaRrTyt0=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=0/J1JGbkdMKyoD7AXeZXBjdaCjy4EIqkCVWHD7 6lpqgobZ2dFd+mQNh2UEoHMJ+SCRr8HszK9XBOWTYwiEPG7RJl1I1tYHNnORdRLgWPpXxm /Y7g4NyyzzXG5BYGal7AQOP3Egt+0/ALqVHkztXkVkhfXAhCheLXRAa30n6GS18PXERF01 IkNMBRqYvCk6RS3o6BfvcBeACzEIdzZeJ+Mtw7UgbHYh7rvutV2A0yjtmOh7QYb+gfDkEg s3SRd4OrTUokQcpnHEuxa3uGkYEgRmrORnfpKxkE12FkfLfhOSdV8Wu2QrFX6uMBMiRycO XcsLFDTHXABUgyf2AE54B/sQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id ef12c0ef (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 22 Jun 2025 18:22:17 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#78861: [PATCH] Avoid calendar flicker In-Reply-To: <865xgnhm5j.fsf@gnu.org> References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <878qlj7tsq.fsf@ledu-giraud.fr> <865xgnhm5j.fsf@gnu.org> Date: Sun, 22 Jun 2025 18:22:15 +0200 Message-ID: <874iw77nm0.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: 78861@debbugs.gnu.org >> Date: Sun, 22 Jun 2025 16:08:37 +0200 >> >> Eli Zaretskii 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!) -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 14:13:37 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 18:13:38 +0000 Received: from localhost ([127.0.0.1]:49729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTPCB-0007ag-Uu for submit@debbugs.gnu.org; Sun, 22 Jun 2025 14:13:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39336) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTPC8-0007Zh-WF for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 14:13:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uTPC3-0005AE-AX; Sun, 22 Jun 2025 14:13:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HLI/lslVgbrOIEEA9M8trtI8A3KGjn92UupQksisi/Y=; b=VuVvsq1d1k69 tr8spbzCqMExaSsXdA0wb5jQTOqgWYpfy5kMqi4suHWvzKwsaZlYxPs0fthrLktvG3Iwo8dO8dAqv DC1UKdwcYjD9f9hunwnsxZwjwh+mGaLMgXHuuPYt4QRwOZAY0ecVQvoEsJGnPyiEnV2zIOs4B5neo 3FWrWYlFMXXG7SDmbP0U8CV8fVxVePM81rqJaxv/HsRNQwnr23dld7YpNt+Kp/bUu//OwT28iVc8l wslGE5BQ3k5gbCUCCvFvq0WotYnFykVQNrMqxTtId7874HfqDPoY1k5AuOuUocqrTYAZsB5UxR1oz VoBX6lKLWaPKGwHZEZia9w==; Date: Sun, 22 Jun 2025 21:13:23 +0300 Message-Id: <86zfdzfxvg.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <874iw77nm0.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sun, 22 Jun 2025 18:22:15 +0200) Subject: Re: bug#78861: [PATCH] Avoid calendar flicker References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <878qlj7tsq.fsf@ledu-giraud.fr> <865xgnhm5j.fsf@gnu.org> <874iw77nm0.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: 78861@debbugs.gnu.org > Date: Sun, 22 Jun 2025 18:22:15 +0200 > > Eli Zaretskii writes: > > >> From: Manuel Giraud > >> Cc: 78861@debbugs.gnu.org > >> Date: Sun, 22 Jun 2025 16:08:37 +0200 > >> > >> Eli Zaretskii 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? 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 17:55:55 2025 Received: (at 78861) by debbugs.gnu.org; 22 Jun 2025 21:55:55 +0000 Received: from localhost ([127.0.0.1]:49950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTSfL-00030G-2l for submit@debbugs.gnu.org; Sun, 22 Jun 2025 17:55:55 -0400 Received: from mout.gmx.net ([212.227.15.19]:34961) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTSfI-0002yr-P2 for 78861@debbugs.gnu.org; Sun, 22 Jun 2025 17:55:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1750629342; x=1751234142; i=stephen.berman@gmx.net; bh=IEAwc/nb7zjntHskjXYxEq1pabGChujsT5bE5zay+h0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=LsblmKj+2PY2TXKXOD4NUE5eWWnEE/7KBc/9QSo2iG4Jo+1xFbxgaeUX8nHQOvn9 YGv0LZduF5dkdt8Wm1PVNL6RkrwQiyOTkxmVOypN3/DtgEl1ZwXYLn4uH2+f4ZW45 5gOlylRA6wAjxzySkZX3YI4InOQ+u698XGM57sT9eU8sCHnzWAdDRn3TMQMdAAbX8 d4xRbuHJS9U0Z8UNF39lDM0ffumQLo5XokuG3xfgEwy0qI5fduqBY/crLBWzO+bbB gqqjuFrOGYXGyhx5hAD+tvFskMhBRXzXIznh32dN7QAfIRp4QxpWEG+9pVacU1IGS 95PJB2szun+4hDYV6w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([88.130.48.165]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7QxL-1uoe712DvB-0164Bd; Sun, 22 Jun 2025 23:55:42 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#78861: [PATCH] Avoid calendar flicker In-Reply-To: <867c13hmej.fsf@gnu.org> References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <87wm93nanl.fsf@gmx.net> <867c13hmej.fsf@gnu.org> Date: Sun, 22 Jun 2025 23:55:41 +0200 Message-ID: <87sejrmof6.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:IVzvv5woxkTechasy4CbW5Qx3PYToEfg7jT/BU+Smm66Y8pHqP8 SquwzUBqtSieFTV3r+tCMGFRNHl2IVSyzZavYGnYy55Cm9TXvDhOSvkDfMIx7UrrSsEtbkc dHD1LXg7LtYgTrLYPD1gnyHr8rBIwEswhyyTDbVUOxuj6NnK0DRey1MNj9X6VO9FWRaF0Ae WNViVkrG3Kcd1GCmT8ZsA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:+nOaKaRks1Q=;fgHJhxeTJZ1BiIHq4h6cP83DBMw sbJSHvr8T0Sih7aZKqWDcsbv9pur881tWl1hS9vxlkt9j8hfcRDhgHAQ8lL6J0RQ+F+gBhpep NF2KoIrQXHZUY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0kyXz2WwSSvToSC7yqehP cAglA5YtxCLDJbDJ0xqv6kp+kS/WjBgFniikCWeADhaUZLTUuwfuCtqY8aKp7Hubypmq80v5S 5AwPfg6ulJmdzUK2lZnZzN9ObA3KeBsJ4k3vHJLdEk7Gb/kbNxFxVMV2cvZJZQmjGzh3bb+CE UNPIotSTWcv9kWrehw/BzvaKEIV5EpKrjsaWk+TKfV/0IN/aOMkaEhX583C1XCrlNYDtS6ehD ObGPGDPlke6SlYGMPECwxfA3rWWdGcX64iHHPbtVW7Co70jmt+el+ZhGfZTztEdRo9fCH9/Pa KEkD8w0j4y2U2RbvknqrZGtBPq8vlmFR9lQLCQWQ0bYtMFJcmHzUmWQr+U1rVL6NsyScrzInq I5uIKZPYeJRru+gR3eDMjf9IZ7EJO+d15E/sYsaiXU55cLVWeZ0EUbw7WKiSlf6WAxtVUZktw T26KGiQX84zAi4sqO+bWkpWSud+24KGC/tycIhOu2qsHZhSwJYk80BslvcNGxDB8uQYkddWjy 9qY/iIz20a8eGa18djs0wC5m/B+b3lk0h5yAR1epKPqiTMMDOPRu01tAKKvCf32eceqBPsXTV ehjGBNPlXMpqMrfdCHK3+MBtHw6Bm0kLIDBoaPK+afqDA99UmKjyrz4BtKeWhgusL1t1QtyfD rhtEpYZ0L0qu2FQqV7k0ZVyWlPu7ACZjqgMctuPzxOhEGqy2n/HFrwXOGczJLAAQQGb93Lsre pDLVRbE6ZP85pDwJE16Q/1gd7/X7jP4zHqd91mLjvtA95bA1oQWCFaAf85eBEC4rhWO1lVzke 6hUKN+J4dIkg5k4KX7nLN//Rh8EkmGDvG9e0GQGMdzSE70WsZn9LCsljhyodgtixMMfi5PmvW Dj3Z/LL+LnazTb5QibWV0bKOmuCj/6QwAjU2xn3LTlA6HeprXhhd4OwRIfmCB0Ibau61Alsqi jfsE= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78861 Cc: manuel@ledu-giraud.fr, 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, 22 Jun 2025 17:38:12 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: Manuel Giraud , 78861@debbugs.gnu.org >> Date: Sun, 22 Jun 2025 15:55:26 +0200 >>=20 >> I don't see any flickering or redrawing with that recipe, but in my >> calendar and diary configuration I do see what looks like delayed >> fontification of certain date marking. I've narrowed the issue down to >> a combination of marking lunar phases and having a sufficiently large >> number of diary entries (in my case due to including several todo-mode >> files). Here is a recipe: >>=20 >> 0. Make ~/.emacs.d/diary consist of the following lines: >> ------------------------------- >> %%(diary-lunar-phases 'warning) >> Jun 22, 2025 test >> ------------------------------- >> and then repeat the second line a large number of times (5000 shows the >> issue clearly on my machine, 1000 shows it too, but not as clearly). >> 1. emacs -Q >> 2. M-x calendar >> 3. Hit 'm' and then alternatively '>' and '<'. >>=20 >> On typing 'm' there is a noticeable delay before the dates are marked, >> on the first scroll command also a noticeable delay but not as long, on >> subsequent scroll commands much less delay but enough to see the dates >> first with default face, then change to warning face. With Manuel's >> patch let-binding 'inhibit-redisplay', there are still delays when >> scrolling but the lunar phase dates are shown in warning face as soon a= s >> the scroll happens. > > Is this an interesting case? Do people frequently have thousands of > such lines in their ~/diary files? The 5000 lines was just to clearly show the effect; the todo-mode files I include contain almost 3000 items in total, but only 100 diary items, and the effect I see there is much less than with my exaggerated recipe, though noticeable. > Anyway, what triggers the fontifications that are evidently done after > the initial display? Are there any timers involved, perhaps? IOW, > why isn't the buffer fontified immediately? I haven't examined the code yet; however, I did try my exaggerated recipe after commenting out the sit-for calls in calendar-generate-window, and while there is still an noticeable delay with the initial marking of entries, and a smaller delay on scrolling, I do see the correctly fontified entries as soon as the scroll happens, and haven't noticed any other problems in the Calendar display without the sit-for calls. So removing these calls seems like a good idea. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 23 03:50:30 2025 Received: (at 78861) by debbugs.gnu.org; 23 Jun 2025 07:50:30 +0000 Received: from localhost ([127.0.0.1]:53412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTbwj-0003uC-K6 for submit@debbugs.gnu.org; Mon, 23 Jun 2025 03:50:30 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:32884) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTbwg-0003tq-4X for 78861@debbugs.gnu.org; Mon, 23 Jun 2025 03:50:27 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=Xbp02ar0 jOaANMRus8tdqEAi5snIdA3tgT/4+Uh8FEU=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=utrvzEgW9kJKpCfaNW3gcKLWywXKZc /73RKIdsk0Bv1UNxr2lMiEYj/EMnWthvdo8R3anAWxVjP4TL+DvJG6Bw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=Xbp02ar0jOaANMRu s8tdqEAi5snIdA3tgT/4+Uh8FEU=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=h++CuMk8TUV9jX6PU3oQeHozgkznq6UaW41I5E IVcxr4T9RdZ4QhAZztVC8e5FatmJpnqkQ3DWNMs6Wx3oQQqgv1GIWhksuOT1QNxazX6CuA daGugEb8MzM9YDCXFBBNRIb2dmZVKrkZFbYJFLhfqNuKqKL4/9ML5Sm49cYv/pTB8qVrXK L/yYK7W98gg8Ror8kk2TJ2pa4+2WL1jAubGJfV5PNhYjlv3fRj14JzaBaqKzJqbJ6UhazM rMznM05r4oVucxeyn3wSfYRFwvVt96w/F/tCD78wON6T4QlxiHwCvhcZLCvPWbsfZrYBVn dnRIYWdaa4gTCfAofMdj3iLA== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 472c1d6c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 23 Jun 2025 09:50:23 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#78861: [PATCH] Avoid calendar flicker In-Reply-To: <86zfdzfxvg.fsf@gnu.org> References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <878qlj7tsq.fsf@ledu-giraud.fr> <865xgnhm5j.fsf@gnu.org> <874iw77nm0.fsf@ledu-giraud.fr> <86zfdzfxvg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 23 Jun 2025 09:50:23 +0200 Message-ID: <87tt466gn4.fsf@ledu-giraud.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78861 Cc: 78861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: 78861@debbugs.gnu.org >> Date: Sun, 22 Jun 2025 18:22:15 +0200 >> >> Eli Zaretskii writes: >> >> >> From: Manuel Giraud >> >> Cc: 78861@debbugs.gnu.org >> >> Date: Sun, 22 Jun 2025 16:08:37 +0200 >> >> >> >> Eli Zaretskii 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Avoid-flicker-when-marking-diary-entries-bug-78861.patch >From 76a569bed53a94c4f2b10970182aca3a9bf1f025 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 23 Jun 2025 09:45:49 +0200 Subject: [PATCH] Avoid flicker when marking diary entries (bug#78861) * lisp/calendar/calendar.el (calendar-generate-window): Remove historical and not really understood `sit-for' calls. --- lisp/calendar/calendar.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 1c98de98b9b..917624c489e 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1432,12 +1432,10 @@ calendar-generate-window (fit-window-to-buffer nil nil calendar-minimum-window-height) ;; For a full height window or a window that is horizontally ;; combined don't fit height to that of its buffer. - (set-window-vscroll nil 0)) - (sit-for 0)) + (set-window-vscroll nil 0))) (and calendar-mark-holidays-flag ;; (calendar-date-is-valid-p today) ; useful for BC dates - (calendar-mark-holidays) - (and in-calendar-window (sit-for 0))) + (calendar-mark-holidays)) (unwind-protect (if calendar-mark-diary-entries-flag (diary-mark-entries)) (run-hooks (if today-visible -- 2.49.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 28 05:53:41 2025 Received: (at 78861-done) by debbugs.gnu.org; 28 Jun 2025 09:53:41 +0000 Received: from localhost ([127.0.0.1]:48036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uVSFg-0002jV-16 for submit@debbugs.gnu.org; Sat, 28 Jun 2025 05:53:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47146) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uVSFd-0002iD-Sg for 78861-done@debbugs.gnu.org; Sat, 28 Jun 2025 05:53:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uVSFY-0005Pd-Ie; Sat, 28 Jun 2025 05:53:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pRidiGWnOo7Ft/gUAEYXtsU/aquUdyF+NDtugjZQhgc=; b=TLSc/8obYb9v +PO1FRx7pGu96MwPnSH3/b0oFhJEDujjhyS/UPT+0prouDMsAk64BqWZ2WV9sl3xKuD0kxvYsjMp2 JxA9GoM1L5GoQkScfbi/mnwM4TE3vloud/gsvQWkyX+nGi6+qgpDR/Soo5+IiKOCb++L46vG1XXQh XBb/Sh5QR0prVdeK4yLss+LdpchdqrbPcjC2reMjKkp8gmrRONA2Vh4Hx7zm3+SX+LkxiBuUEYYMc p1OJXZ64azo7AgvZK6p7jACam3zH7bnPwEphQbzwShTmGzhqH81rWFN2aftjxEXk/3un8mQj09Mg+ E0xXwmbwrUb3AYE1znDLMA==; Date: Sat, 28 Jun 2025 12:53:30 +0300 Message-Id: <86a55s6vl1.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87tt466gn4.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 23 Jun 2025 09:50:23 +0200) Subject: Re: bug#78861: [PATCH] Avoid calendar flicker References: <87ecvc45xp.fsf@ledu-giraud.fr> <86qzzcgrvm.fsf@gnu.org> <87cyaw6lt7.fsf@ledu-giraud.fr> <86bjqggc41.fsf@gnu.org> <878qlj7tsq.fsf@ledu-giraud.fr> <865xgnhm5j.fsf@gnu.org> <874iw77nm0.fsf@ledu-giraud.fr> <86zfdzfxvg.fsf@gnu.org> <87tt466gn4.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78861-done Cc: 78861-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: 78861@debbugs.gnu.org > Date: Mon, 23 Jun 2025 09:50:23 +0200 > > Eli Zaretskii writes: > > >> From: Manuel Giraud > >> Cc: 78861@debbugs.gnu.org > >> Date: Sun, 22 Jun 2025 18:22:15 +0200 > >> > >> Eli Zaretskii writes: > >> > >> >> From: Manuel Giraud > >> >> Cc: 78861@debbugs.gnu.org > >> >> Date: Sun, 22 Jun 2025 16:08:37 +0200 > >> >> > >> >> Eli Zaretskii 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. From unknown Fri Aug 15 01:56:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Jul 2025 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator