Subject: Re: bug#76439: [PATCH] Specify 'tab-bar-history-mode' in 'winner-mode' docstring

From: Visuwesh <[email-masked]>
Date: Fri, 21 Feb 2025 16:05:03 +0530

[வெள்ளி பிப்ரவரி 21, 2025] Robert Pluim wrote:

>>>>>> On Fri, 21 Feb 2025 15:46:47 +0530, Visuwesh <[email-masked]> said:
>
>     Stephen> Or "instead, since it provides", since it's a justification of the
>     Stephen> recommendation.
>
>     Visuwesh> Are you supposed to have a comma before since?  In any case, is the
>     Visuwesh> grammar of
>
> Contrast:
>
>     Itʼs not mandatory but since the sentence is long itʼs nice to
>     provide the comma in order to allow the reader to pause mentally.
>
> with putting commas between the clauses:
>
>     Itʼs not mandatory, but since the sentence is long, itʼs nice to
>     provide the comma in order to allow the reader to pause mentally.
>
> The following would be excessive (also known as "Shatner-mode"):
>
>     Itʼs not mandatory, but, since the sentence is long, itʼs nice to
>     provide the comma, in order to allow the reader to pause, mentally.
>
> In short: the comma before "since" works well.

Right, thanks for the hint.  I was using commas excessively at one point
in time, but that got me some comments which ended me here...
[ One of these days, I should finish reading The Elements of Style.  ]

>     Visuwesh>     If you intend to use `tab-bar-mode' with `winner-mode', we recommend
>     Visuwesh>     using `tab-bar-history-mode' instead, since it provides tab-specific
>     Visuwesh>     window configuration history, and is better behaved when
>     Visuwesh>     `tab-bar-mode' is turned on.
>
>     Visuwesh> correct?
>
>     >> That works as well. Iʼm told that using ';' is falling out of favour,
>     >> since allegedly the youth of today donʼt understand it.
>
>     Visuwesh> It is hard to figure out where to put the semicolon.  It falling out of
>     Visuwesh> favour means there aren't plenty of examples unless you're reading
>     Visuwesh> Victorian novels I suppose.
>
> Anytime there can be a comma, there can be a semicolon. Easy 🙂

Wasn't there a distinction between a "short" and a "long" pause?
Something about short clauses?

In any case, how about the attached?

>From 110d36dad07e3205e3591f98b584127d2d253042 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Thu, 20 Feb 2025 20:19:32 +0530
Subject: [PATCH] Recommend 'tab-bar-history-mode' over 'winner-mode'

* lisp/winner.el (winner-mode):
* lisp/tab-bar.el (tab-bar-mode): Update the docstring to
suggest 'tab-bar-history-mode' instead of 'winner-mode' when
using 'tab-bar-mode' instead.  (Bug#76439)
---
 lisp/tab-bar.el | 7 ++++++-
 lisp/winner.el  | 8 +++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 2a6137f527f..d428350c9b1 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -291,7 +291,12 @@ tab-bar-mode
 See `current-window-configuration' for more about window configurations.
 To add a button (which can then record one more window configuration),
 click on the \"+\" button.  Clicking on the \"x\" icon of a button
-deletes the button."
+deletes the button.
+
+If you intend to use `tab-bar-mode' with `winner-mode', we recommend to
+use `tab-bar-history-mode' instead, since it provides tab-specific
+window configuration history, and is better behaved when `tab-bar-mode'
+is turned on."
   :global t
   ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
   :variable tab-bar-mode
diff --git a/lisp/winner.el b/lisp/winner.el
index e56ddf92965..e56e7268727 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -345,7 +345,13 @@ winner-mode
 into windows) so that the changes can be \"undone\" using the
 command `winner-undo'.  By default this one is bound to the key
 sequence \\`C-c <left>'.  If you change your mind (while undoing),
-you can press \\`C-c <right>' (calling `winner-redo')."
+you can press \\`C-c <right>' (calling `winner-redo').
+
+If you use `tab-bar-mode', consider using `tab-bar-history-mode' as
+`winner-mode' is unaware of tab switching and might turn the window
+configuration of the current tab to another's (old) window
+configuration.  `tab-bar-history-mode' provides tab-specific window
+configuration history avoiding this problem."
   :global t
   (if winner-mode
       (progn
-- 
2.47.2