GNU bug report logs - #64596
30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update)

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Thu, 13 Jul 2023 13:01:02 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #248 received at 64596 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: monnier <at> iro.umontreal.ca, 64596 <at> debbugs.gnu.org
Subject: Re: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481
 (force-mode-line-update)
Date: Wed, 19 Jul 2023 10:11:19 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I saw this. But "update" is not used consistently across that
>> commentary.
>
> Tough.  "Update" is too general a word to limit is use.  Sorry.

May it be replaced by another, more precise, term then?

>> If we read at the very beginning:
>> 
>>     /* New redisplay written by Gerd Moellmann <gerd <at> gnu.org>.
>>     
>>        Redisplay.
>>     
>>        Emacs separates the task of updating the display from code
>>        modifying global state, e.g. buffer text. ...
>>     
>>        Updating the display is triggered by the Lisp interpreter when it
>>        decides it's time to do it....
>> 
>> Which immediately creates an impression that "redisplay" and "update"
>> are referring to the same thing.
>
> There's no practical way to avoid all the possible misinterpretations
> of this large and complex text, especially when it is read for the
> first time.

What about the attached patch?
[0001-src-xdisp.c-Clarify-the-meaning-of-update-term-in-co.patch (text/x-patch, inline)]
From 2be256093307246f8a3a62a5613467ceb6e7e9b8 Mon Sep 17 00:00:00 2001
Message-ID: <2be256093307246f8a3a62a5613467ceb6e7e9b8.1689761362.git.yantar92 <at> posteo.net>
From: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Wed, 19 Jul 2023 13:08:54 +0300
Subject: [PATCH] * src/xdisp.c: Clarify the meaning of "update" term in
 commentary

See bug#64596.
---
 src/xdisp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index a3464c2c375..b306159c2f9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -75,6 +75,13 @@ Copyright (C) 1985-2023 Free Software Foundation, Inc.
    and to make these changes visible.  Preferably it would do that in
    a moderately intelligent way, i.e. fast.
 
+   To be as fast as possible, redisplay code tries hard to avoid
+   updating unchanged parts of the display on the glass.  Redisplay
+   process starts from examining what has been changed since the
+   previous redisplay and only running the glass _update_ action when
+   necessary.  In the code below, functions and variables related to
+   updating on the glass will have _update_ in their names.
+
    Changes in buffer text can be deduced from window and buffer
    structures, and from some global variables like `beg_unchanged' and
    `end_unchanged'.  The contents of the display are additionally
-- 
2.41.0

[Message part 3 (text/plain, inline)]
-- 
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>

This bug report was last modified 1 year and 328 days ago.

Previous Next


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