From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 13:15:39 -0400 Message-ID: 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> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39323"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: yantar92@posteo.net, 64596@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 15 19:16:12 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 1qKisO-000A2U-BF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jul 2023 19:16:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKisF-0005NL-P6; Sat, 15 Jul 2023 13:16: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 1qKisE-0005NB-9l for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 13:16: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 1qKisE-0006Ly-1L for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 13:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKisD-0006BO-TK for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 13:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2023 17:16: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.168944135223748 (code B ref 64596); Sat, 15 Jul 2023 17:16:01 +0000 Original-Received: (at 64596) by debbugs.gnu.org; 15 Jul 2023 17:15:52 +0000 Original-Received: from localhost ([127.0.0.1]:45864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKis4-0006Ay-6s for submit@debbugs.gnu.org; Sat, 15 Jul 2023 13:15:52 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKirz-0006Ag-Ua for 64596@debbugs.gnu.org; Sat, 15 Jul 2023 13:15:51 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A61C18065C; Sat, 15 Jul 2023 13:15:42 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 510FF805DE; Sat, 15 Jul 2023 13:15:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689441341; bh=xzSgMR3y3iaHrBZAb1tquiLtiAQpr4CJySvHnOkYqXk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=foG9SO/O6sB2+hb38zcNUoSxcTiX9/TolFcSHTk6ECPD3OrXBwqnzFZwIpIwYJnBG 4uf2XJrpxw7SNeIApDRctCJxmOKDvkULutIRDKJ5CTkHxFMADrzYhPwgkgpzkREDv2 dWDZYbKG3AsC6nTJMFLGzxu4NWiaOLo8mkAyENFeBJbk6Ajw30akHY8f7CRM42u7j3 eEytMz2W32lS+Da0k9FtVAd95pqnqHj++nf6amK7/yAjv+KLg19S7b+ixRbiGCVBcT cSssJ1YmbvVyuD36c1bK/g1VtkUCpq3goiiKFXvwGbvmLJX6UamUnh2csucLlQmHBB PM2J4jJNYl2OQ== Original-Received: from pastel (unknown [108.175.230.17]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 249CD12034B; Sat, 15 Jul 2023 13:15:41 -0400 (EDT) In-Reply-To: <83jzv1b152.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Jul 2023 19:16:57 +0300") 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:265227 Archived-At: > 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? I'll try to update the docs to clarify this. Stefan diff --git a/src/window.h b/src/window.h index 2f793ebe438..48d3fd3dc82 100644 --- a/src/window.h +++ b/src/window.h @@ -1114,9 +1114,12 @@ #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \ extern Lisp_Object echo_area_window; -/* 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. */ extern int update_mode_lines; @@ -1134,6 +1137,11 @@ #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \ extern void wset_redisplay (struct window *w); extern void fset_redisplay (struct frame *f); extern void bset_redisplay (struct buffer *b); + +/* Routines to indicate that the mode-lines might need to be redisplayed. + Just as for `update_mode_lines`, this includes header-lines, frame names + and menu-bars, and the link with frame names and menu-bars is still + unclear. */ extern void bset_update_mode_line (struct buffer *b); extern void wset_update_mode_line (struct window *w); /* Call this to tell redisplay to look for other windows than selected-window