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: Tue, 04 Jun 2024 18:59:21 +0300 Message-ID: <86v82ok8bq.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40546"; 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 Tue Jun 04 19:07:09 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 1sEXcp-000AEw-Sx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Jun 2024 19:07:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEXcY-0003bP-U9; Tue, 04 Jun 2024 13:06:50 -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 1sEXcX-0003bB-7F for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 13:06:49 -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 1sEXcW-0001uA-Va for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 13:06:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sEXck-0001S7-8a for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 13:07: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: Tue, 04 Jun 2024 17:07: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.17175207895492 (code B ref 68765); Tue, 04 Jun 2024 17:07:02 +0000 Original-Received: (at 68765) by debbugs.gnu.org; 4 Jun 2024 17:06:29 +0000 Original-Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEXcD-0001QV-8R for submit@debbugs.gnu.org; Tue, 04 Jun 2024 13:06:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEXcB-0001QE-4D for 68765@debbugs.gnu.org; Tue, 04 Jun 2024 13:06:28 -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 1sEWZI-0001tZ-Ib; Tue, 04 Jun 2024 11:59:24 -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=wLW/lXTWWP4agj/AfI0IxR57VzSJlCPTN36lB/zZbt8=; b=rfpaMRr9uCzN 9tVl9TZXkiMhu2EpmMbl0L4/M7R9KFi56tBdgsADHKxI5uN3BIqqLW4djayd+8Py/zNZWvqmUqnU5 7qviLj/F6HkhyhD66xXPJK5v1wXa8LVQ473+/nEH4KmvToVAg1pn39qdTtT3IDKg71yhpnG0S2Fap TqDKpOXCPpPy93j4IY/1wbG92GIwlwz1HtvhfaS4lXA/q2aiAAp+PzqGfJkyxHPFqHK9B1RA8XvMO MKx0tJZHRkXtuFynCeaVS0xEBTXTCfgx3hac7NZcUzz+pvx4TifdXIH3wkmoUkij22ACfs3w1AX++ B4ube+X6OiaNK4JfWusFzA==; In-Reply-To: (message from Jared Finder on Mon, 03 Jun 2024 22:24:55 -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:286553 Archived-At: > Date: Mon, 03 Jun 2024 22:24:55 -0700 > From: Jared Finder > Cc: juri@linkov.net, 68765@debbugs.gnu.org, philipk@posteo.net, > monnier@iro.umontreal.ca > > > How about if we make the behavior simpler and more predictable: > > > > If a window's buffer has a non-nil value of window-toolbar-mode, > > show the window-specific tool bar regardless of what it is and > > whether it is the same as the default. > > > > Why is this not good enough? > > I want the window-specfic tool bar to never be shown if there are no > tool bar buttons, to conserve space. However, if tab-line-format is non > nil, the tab line takes up space even if the resulting tab line is nil. > This can happen if one sets the default tool bar to nil, while keeping > the mode specific tool bars. If the issue is not to show an empty tool bar, then this could be done by a special test, without affecting behavior in other cases. And having the tool bar completely empty is such a rare and strange situation that we could even leave it alone, under the assumption that such a "tool bar" is simply a bug of sorts. Complicating the overall behavior, let alone the difficulties of explaining the behavior in documentation, on behalf of such rare and very special cases is hardly a good tradeoff, won't you agree? > I think there's also a useful case where the frame tool bar is used to > show a "global" tool bar with buttons that do not act on the current > buffer (in the current default tool bar: new file, open file, open > directory, all the modifier tool bar buttons) and the window tool bar is > used to show buttons that act on the buffer. In this case, you don't > want the "global" tool bar to change based on frame's selected window. > The "tool-bar-always-show-default" variable I added as well as the logic > with ignoring the default value of tool-bar-map was to enable this use > case. I treat the default value of tool-bar-map as "no tool bar buttons > for this window" since all those buttons are for the global tool bar. > It'd be fine to limit behavior to only when tool-bar-always-show-default > was set. I'm not against tool-bar-always-show-default and its effect. But introducing that optional behavior doesn't require any particular behavior from window-specific tool bars, it's almost an orthogonal feature. My conclusion from this is that the two considerations you provided in favor of a much more complex behavior do not contradict my suggestion. The first consideration is about a very rare case, which we could simply ignore (but if you feel strongly about detecting empty tool bars and not displaying them, I won't object), while the second consideration does not require the complicated behavior of window-specific tool bars. If I missed something, or if you still disagree, please tell what and why. Thanks.