From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update) Date: Sat, 15 Jul 2023 22:04:53 +0300 Message-ID: <83h6q5atd6.fsf@gnu.org> References: <877cr4nez9.fsf@localhost> <83lefj4okb.fsf@gnu.org> <83fs5r3tqv.fsf@gnu.org> <834jm6fppc.fsf@gnu.org> <87a5vyidy6.fsf@localhost> <83sf9qe2ip.fsf@gnu.org> <83a5vxejz6.fsf@gnu.org> <83r0p9b3om.fsf@gnu.org> <83jzv1b152.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@posteo.net, 64596@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 15 21:06:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qKkb5-0007XP-JZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jul 2023 21:06:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKkah-0004Jd-LH; Sat, 15 Jul 2023 15:06:03 -0400 Original-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 1qKkag-0004JQ-Qi for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 15:06:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKkag-00077j-Ix for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 15:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKkaf-0000sF-UD for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 15:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2023 19:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64596 X-GNU-PR-Package: emacs Original-Received: via spool by 64596-submit@debbugs.gnu.org id=B64596.16894479103297 (code B ref 64596); Sat, 15 Jul 2023 19:06:01 +0000 Original-Received: (at 64596) by debbugs.gnu.org; 15 Jul 2023 19:05:10 +0000 Original-Received: from localhost ([127.0.0.1]:46087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKkZp-0000r6-JL for submit@debbugs.gnu.org; Sat, 15 Jul 2023 15:05:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKkZm-0000qb-K5 for 64596@debbugs.gnu.org; Sat, 15 Jul 2023 15:05:07 -0400 Original-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 1qKkZg-0006rx-Ja; Sat, 15 Jul 2023 15:05:00 -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=nNb2FLomul02H6nWN1uwvrVTC80OghQVgNBFsN6/4vQ=; b=DRXmwcjlBo5P gvFCv8cFnlbu1YvBQMCrIIiKPUn8NuzfTmax/xtKxPSWf2pT+kFhWMbWextOzUZ7Ipj+JGA8ISW9F DfLdA0cGP22QE8A4gagwwURSKEl6G2/9hwqEkXSAL/C1/UYcVxr/kDXmUF9psS0xHnNXoj18MHzWS J4xGO5IbooieZui338qlEJkaV+x0qxuP+U1oDtCCezaRLjMuOUqIW7f0GbQGcghn+PrBeEivWkQiN 2ZXrrsby5/CbfH+QOHad6SwZnNMwBsa3nV4mjjASBtnPX0PLEJBUdWo6kRiq6ras8CmWqIXIPhF5h l1Pus1cFoEreP98kk2B/8A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKkZI-0000XU-W5; Sat, 15 Jul 2023 15:04:52 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 15 Jul 2023 13:15:39 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265237 Archived-At: > From: Stefan Monnier > Cc: yantar92@posteo.net, 64596@debbugs.gnu.org > Date: Sat, 15 Jul 2023 13:15:39 -0400 > > > Not entirely true, AFAIU. For example, what does update_mode_lines > > have to do with preparing the menu bar? > > > > static void > > prepare_menu_bars (void) > > { > > bool all_windows = windows_or_buffers_changed || update_mode_lines; > > bool some_windows = REDISPLAY_SOME_P (); > > Indeed `update_mode_lines` means more than just mode-lines. It includes > of course header-lines (of course), frame names (less obvious), and also > the menu-bar, and some of those links are indeed not 100% clear. > > WDYT about the patch below? That's an improvement, thanks. But it still isn't everything. For example, what about resize_echo_area_exactly: why does it set this variable? Also, this variable is tested in update_tool_bar and update_tab_bar, so the comment you suggest should mention tool bar and tab bar as well. Unless you know the answers to these questions, I guess more digging is in order. And I'd be happier if, instead of a single variable for so many purposes we would have either several separate variables or make this one a bitmap, where each bit says something very specific about the part of the display that needs updating. Any takers? > -/* Non-zero if we should redraw the mode lines on the next redisplay. > +/* Non-zero if we should redraw the mode line*s* on the next redisplay. > Usually set to a unique small integer so we can track the main causes of > - full redisplays in `redisplay--mode-lines-cause'. */ > + full redisplays in `redisplay--mode-lines-cause'. > + Here "mode lines" includes also header-lines and frame names, and > + apparently also menu-bars. The link with header-lines is clear, > + but a bit less so for frame names and the menu-bar. */ Btw, we need some function to show the information in redisplay--mode-lines-cause in human-readable format, or at least a documentation for how to examine it. Without that, this variable is probably useful only to a very small group of people.