Subject: Re: bug#68765: 30.0.50; Adding window-tool-bar package.

From: Jared Finder <[email-masked]>
Date: Fri, 10 May 2024 21:33:46 -0700

My prior reply got blocked as spam. Sending again.

On 2024-05-09 01:00, Eli Zaretskii wrote:
>> From: Juri Linkov <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  Philip 
>> Kaludercic
>>  <[email-masked]>,  Stefan Monnier <[email-masked]>
>> Date: Thu, 02 May 2024 09:03:20 +0300
>> 
>> >> It's been four weeks and I've seen no reply to this comment.  Are there any
>> >> other concerns?
>> >
>> > Sorry, I didn't know that you expected that I should review your patch -
>> > I was silent because your last patch has no changes in tab-line.el,
>> > so I have no more objections in this regard.
>> 
>> The reason why no changes are required in tab-line.el is
>> because this feature is not exclusively for the tab line,
>> so window-tool-bar.el should also handle the case
>> when the tool bar is combined with the header line.
>> For example, in Info mode the users might prefer to show
>> the Info tool bar icons and Next/Prev/Up
>> on the same header line.
> 
> If there's an agreement about this issue, could you, Jared, please
> post the final patch reflecting the agreements?
> 
> If there's no agreement, what are the issues that prevent it?

I'm unclear on what changes Juri would like to window-tool-bar.el.  
Sorry for the really long reply, I just want to make sure things are 
extra clear so I can proceed.

First, let me share some additional information.  window-tool-bar.el 
currently provides two ways for a user to put the tool bar buttons into 
tab line / header line / mode line:

The command window-tool-bar-mode for simple enablement.
The function window-tool-bar-string can be added as (:eval 
(window-tool-bar-string)) to tab-line-format, header-line-format, or 
mode-line-format programmatically for more advanced placement.

I think the above interface is the right thing to have from a user 
perspective.  Then the most straightforward thing would be to make M-x 
window-tool-bar-mode behave similar to M-x tab-line-mode: it would 
always put the tool bar on the tab line, and only make changes if 
nothing else changed tab-line-format.

Additionally, I would make a very small change then to tab-line.el to 
display a message to the user if M-x tab-line-mode does not actually 
changing anything to avoid user confusion as this now can happen by 
running commands (M-x window-tool-bar-mode RET M-x tab-line-mode RET, 
for example).  I would add similar messaging to window-tool-bar as well.

Does this sound like a good plan?

   -- MJF