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#68765: 30.0.50; Adding window-tool-bar package. Date: Sun, 26 May 2024 12:44:31 +0300 Message-ID: <86o78sx5z4.fsf@gnu.org> References: <07df5e8408054bcae5968066b0cebf34@finder.org> <86fry0vihy.fsf@gnu.org> <86fry08di9.fsf@mail.linkov.net> <86cyrg5hc0.fsf@mail.linkov.net> <865xvyoupe.fsf@mail.linkov.net> <86frur76uj.fsf@gnu.org> <791456a05f91c68549027ea1ea33eaf6@finder.org> <84a5dcf2833598c5b588ab6dd4f5c762@finder.org> <86le4fxa41.fsf@mail.linkov.net> <86frufe9i9.fsf@gnu.org> <8cfec392c3f9259b7499ebd4f605bc25@finder.org> <86pltib8m7.fsf@gnu.org> <1d18b11671667fefa925dbc41423d547@finder.org> <86cypd58ak.fsf@gnu.org> <8dbddd7bed38100561a1555da18a3a08@finder.org> <86ttilygb6.fsf@gnu.org> <67cc1f1b694041bfaf12dab7ef161ec8@finder.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24051"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, 68765@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net To: Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 26 11:45:19 2024 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 1sBARJ-000618-Of for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 May 2024 11:45:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBAQx-0001QD-PU; Sun, 26 May 2024 05:44:55 -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 1sBAQw-0001Ph-JY for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 05:44:54 -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 1sBAQw-0001SI-BJ for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 05:44:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBAR4-0007CQ-62 for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 05:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 May 2024 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68765 X-GNU-PR-Package: emacs Original-Received: via spool by 68765-submit@debbugs.gnu.org id=B68765.171671669427640 (code B ref 68765); Sun, 26 May 2024 09:45:02 +0000 Original-Received: (at 68765) by debbugs.gnu.org; 26 May 2024 09:44:54 +0000 Original-Received: from localhost ([127.0.0.1]:38406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBAQw-0007Bk-4Y for submit@debbugs.gnu.org; Sun, 26 May 2024 05:44:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBAQt-0007BQ-LL for 68765@debbugs.gnu.org; Sun, 26 May 2024 05:44:52 -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 1sBAQd-0001QQ-TW; Sun, 26 May 2024 05:44:35 -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=k+I3GE+Q/75Lpb+6hm0I10SZG/1pkxvzHoNsOLt1NHQ=; b=iI/ybkMgqsKa 7fhb61ISeGEZr6v8ILDz7UrxBv6fcfJjXl95PIUmhwZvq+oTOeOKiwN3WcX5+EAubG2106MVE8vD6 cX7IYYweTY6Z7S2UJjeGNn1+rVziI0PRQ2qvhnnnvsg7pfJ1kYZj/JTiwC+VvJ2S6yiBZQKsm3Ljc 0N4F8bFgWVa6+P68aq2YW1EhZta9Oenk+xGZkuUEMGxY5JTVdGO8v/RdKWPRUurd8acv2WOVkypNG L1ujqL47nxFJb++jVm2AT2f5Jfl9YAYwUfelCa3fDGyxEPvTjmCj7CtAKm9VXsDErwXRG/fYQlewL tlOWOK+zvt3DfhU8hMKyfA==; In-Reply-To: <67cc1f1b694041bfaf12dab7ef161ec8@finder.org> (message from Jared Finder on Sat, 25 May 2024 12:54:30 -0700) 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:285946 Archived-At: > Date: Sat, 25 May 2024 12:54:30 -0700 > From: Jared Finder > Cc: juri@linkov.net, 68765@debbugs.gnu.org, philipk@posteo.net, > monnier@iro.umontreal.ca > > Ok, I tried to fit into the existing convention but not use upper case > letters with "@cindex mode, window tool bar". Let me know if that's not > appropriate. LGTM, thanks. > That's what I was concerned about. Please let me know if this updated > text is clear enough. > > > I will wait for the next version to see if my questions are now > > answered or we need to discuss them further. > > New patch attached. Feedback welcome. Thanks, some comments below. > +@findex global-window-tool-bar-mode > + The command @code{global-window-tool-bar-mode} toggles the display of > +a tool bar at the top of each window. When enabled, multiple windows > +can display their own tool bar simultaneously. To conserve space, a > +window tool bar is only shown if the tool bar for that window's current > +buffer is different from the global (default) tool bar. The most common > +way a buffer has a different tool bar is due to its major mode, so you > +can think of the window tool bar as showing a major mode's tool bar if > +it exists. So, let me understand what happens under this global mode. By default, the frame's tool bar changes according to the major mode of the buffer shown in the frame's selected window. As a very frequent example, entering the minibuffer from a buffer whose mode is, say, Dired or Rmail or Info, changes the tool bar. When that happens, some windows which previously didn't display their tool bar because it was identical to the frame's tool bar will now display their tool bars. Right? And when you exit the minibuffer, those window-specific tool bars will again disappear, right? Wouldn't that cause annoying flickering of the display? (I know that setting tool-bar-always-show-default non-nil can prevent that, but I'm asking about the default behavior.) Btw, what exactly is the meaning of "the tool bar of the window is different from the global tool bar"? How are tool bars compared? For example, a button on the tool bar can have the :visible attribute, which will cause the icon not to appear under some conditions -- will a tool bar with that icon on display be considered "different" from a tool bar where the icon is not shown due to :visible conditions? > +@findex window-tool-bar-mode > +If you want to toggle the display of a window tool bar for only some > +buffers, run the command @code{window-tool-bar-mode}. I guess this should say that window-tool-bar-mode should be run in the buffer(s) where the window tool bar is desired? > +bar will then only appear at the top of any window displaying that > +buffer. This is useful to put in a hook. "in a mode hook", I suppose? > +Note that the window tool bar displays in the same space as the tab > +line, so only one of these can be display at a time unless you customize > +the value of @code{tab-line-format} in Lisp. In this case, add > +@code{(:eval (window-tool-bar-strng))} to @code{tab-line-format}. ^^^^^ A typo? > + A window can have a @dfn{tab line} at the top. If both the tab line > +and header line are visible, the tab line appears above the header line. > +The tab line feature works just like the mode line feature, except that > +it's controlled by @code{tab-line-format}: > + > +@defvar tab-line-format > +This variable, local in every buffer, specifies how to display the tab > +line, for windows displaying the buffer. The format of the value is the > +same as for @code{mode-line-format} (@pxref{Mode Line Data}). It is > +normally @code{nil}, so that ordinary buffers have no tab line. > +@end defvar I wonder whether it's a good idea to tell that tab line works "the same as mode line", since the purpose is very different, and the default value of tab-line-format is very different from the default of mode-line-format. At the very least I think we should tell that tab-line-format should cause the tab line appear as a row of buttons, clicking on which should change the buffer shown in the window. > ++++ > +** New user option 'tool-bar-always-show-default'. > +This can be set so that the tool bar at the top of a frame does not show > +buffer local customization of the tool bar. This is convenient when > +using the newly added 'global-window-tool-bar-mode'. This should tell the values of the option and their effect.