From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68765: 30.0.50; Adding window-tool-bar package. Date: Sun, 02 Jun 2024 08:57:52 -0700 Message-ID: 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> <86o78sx5z4.fsf@gnu.org> <65a70df3c5e0edf72fb6d6e1dda99c22@finder.org> <861q5owh5v.fsf@gnu.org> <864jabor61.fsf@gnu.org> Reply-To: Jared Finder Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, 68765@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 03 06:57:32 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 1sDzlC-0005pH-Rb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Jun 2024 06:57:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDyIy-0002xF-Df; Sun, 02 Jun 2024 23:24:16 -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 1sDyIu-0002r2-39 for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 23:24:12 -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 1sDnbd-0004kM-OM for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 11:58:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDnbq-0003Rh-1I for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 11:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jared Finder Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jun 2024 15:59: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.171734389013182 (code B ref 68765); Sun, 02 Jun 2024 15:59:02 +0000 Original-Received: (at 68765) by debbugs.gnu.org; 2 Jun 2024 15:58:10 +0000 Original-Received: from localhost ([127.0.0.1]:60186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDnaz-0003QX-AT for submit@debbugs.gnu.org; Sun, 02 Jun 2024 11:58:09 -0400 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:51938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDnav-0003QN-AN for 68765@debbugs.gnu.org; Sun, 02 Jun 2024 11:58:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1717343872; bh=t+puzp+Sc08Vlp7dKC8GjzC4yuKtiY/62vvpRmCIvmI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=0oSNT4nwEbCZH5EYu5aPpB5Xw6JlTRjWJR6X8+8LARQSc/9rnsmmZQII8wrK2mYFc 3zEV/GU69hGSTJf93uRpglf3vBhGv1Nu0t97q4w8smWPZjCxlxOZVG7kZTzL9G6eba eIf0eKvpBMeffzaf6AZCeY3GlEmWLFHPqeY8292mtaJ31zs06l9CJRvSdrVzhcwRfa hFh+8EOlwMAZJ7P8btxqRonl3yOJgG9wrRJm1vd355qarMV4jvd6cHyCwU03iQpbj0 qAbHdHIgwM9hlDeRKTo61wWOpxyGOQesnl9YtdtD3GZXA/Ka2ktIjoydHXZpx0XHdc odO4x4grCgh3Q== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id 4A2A97A1; Sun, 2 Jun 2024 15:57:52 +0000 (UTC) In-Reply-To: <864jabor61.fsf@gnu.org> X-Sender: jared@finder.org 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:286417 Archived-At: (I mistakenly sent this to just Eli. Sorry about that!) On 2024-06-02 08:56, Jared Finder wrote: > On 2024-06-01 22:21, Eli Zaretskii wrote: >>> Date: Sat, 01 Jun 2024 21:17:58 -0700 >>> From: Jared Finder >>> Cc: juri@linkov.net, 68765@debbugs.gnu.org, philipk@posteo.net, >>> monnier@iro.umontreal.ca >>> >>> > I'm beginning to think that the feature whereby we don't display the >>> > window's tool bar under some conditions "to conserve space" is more >>> > confusing and hard to document than is useful, and perhaps we should >>> > simply show the window's tool bar unconditionally? >>> >>> I find it really useful to have this auto-show/hide behavior. As I >>> wrote in the docs, "you can think of the window tool bar as showing a >>> major mode specific tool bar if it exists". >> >> That's okay, I'm just saying that if the window's major mode has its >> own tool bar, we should show that tool bar on a window regardless of >> whether the frame's tool bar shows the same buttons. > > > >>> + 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 the window's >>> displayed >>> +buffer has a different binding from the global (default) tool bar. >>> The >> >> This should explain what does "global (default) tool bar" mean. My >> understanding is that this is the tool bar shown for the frame, which >> will continue working as it does now, i.e. be determined by the major >> mode of the frame's selected window. > > > >>> Having no space taken up when editing a text file, then having the >>> tool bar appear when I hit C-s lines up with what I see in many >>> other programs. I'd be sad to see this behavior removed. >> >> That's not what I'm talking about. I'm talking about removing the >> window's tool bar because the frame's tool bar became identical to it. >> Here's a scenario: >> >> . you have a frame with Info mode and some other mode >> . the frame's tool bar is the default one, and the window under Info >> shows its own tool bar from info.el >> . now I type "C-h i" in the window that was previously in mode other >> than Info -- now the frame's tool bar is the one from Info mode, >> and suddenly the other window loses its window-specific tool bar! >> >> IOW, what bothers me is that we _remove_ the window's tool bar because >> the frame-global tool bar changed. And you just confirmed above that, >> while currently this is not the behavior, you'd like to fix the code >> so it _is_ the behavior. >> >> Am I missing something? > > There's a misunderstanding here. Can you please suggest how I can > change the documentation? I'm not sure why the documentation I wrote > is confusing. > > Let me explicitly describe the terms I am using: > > When I write "the global (default) tool bar", that refers to the value > of (default-value 'tool-bar-map). It's the tool bar with New File, > Open File, Open Directory, Kill Buffer, Save, Undo, Cut, Copy, Paste, > Isearch. This doesn't change with major mode. As far as I can tell, > it doesn't change during normal Emacs operations (unless a user chooses > to modify it, of course). > > When I write "the frame tool bar", that refers to the tool bar > displayed at the top of a frame, as controlled by M-x tool-bar-mode. > There is no change of behavior here except for the new user option > tool-bar-always-show-default. > > When I write "the window tool bar", that refers to the tool bar > displayed at the top of a window, as controlled by (newly added) M-x > window-tool-bar-mode or M-x global-window-tool-bar-mode. The window > tool bar displays the value of tool-bar-map the window's displayed > buffer. But it only displays that tool bar if it is not the same as > the global (default) tool bar. It does not pay attention to the frame > tool bar. Specifically, the test is: > > (eq tool-bar-map ;a buffer's tool bar > (default-value 'tool-bar-map) ;the global (default) tool bar > ) > > I hope from the above description it is clear that switching windows > does not cause the window tool bar to flicker as the window tool bar > doesn't care what the frame tool bar shows. > >>> The most prominent other source of a custom tool bar is isearch. >> >> Oh, there are many more modes that customize the tool bar in important >> ways. Help mode, Info mode, Customize, GUD modes, email modes, Grep, >> and EWW, to name just a few popular ones. > > Are there any others that are minor modes like isearch? I ask because > the "only display when tool bar is different" check isn't run on minor > mode changes. That's the bug I'm referring to that I'd like to fix. > Currently Window Tool Bar mode adds a function to isearch-mode-hook and > isearch-mode-end-hook to work properly with isearch. I would prefer a > generic way to handle this. > > > All other suggested changes I'll add to my next patch. I'm just > waiting to figure out how to properly document the above > misunderstanding. > > -- MJF