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

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

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

Thanks for thoroughly checking.

>>>>>> On Fri, 21 Feb 2025 16:05:03 +0530, Visuwesh <[email-masked]> said:
>     Visuwesh> -deletes the button."
>     Visuwesh> +deletes the button.
>     Visuwesh> +
>     Visuwesh> +If you intend to use `tab-bar-mode' with `winner-mode', we recommend to
>     Visuwesh> +use `tab-bar-history-mode' instead, since it provides tab-specific
>     Visuwesh> +window configuration history, and is better behaved when `tab-bar-mode'
>     Visuwesh> +is turned on."
>
> "we recommend using"
>
>     Visuwesh>    :global t
>     Visuwesh>    ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
>     Visuwesh>    :variable tab-bar-mode
>     Visuwesh> diff --git a/lisp/winner.el b/lisp/winner.el
>     Visuwesh> index e56ddf92965..e56e7268727 100644
>     Visuwesh> --- a/lisp/winner.el
>     Visuwesh> +++ b/lisp/winner.el
>     Visuwesh> @@ -345,7 +345,13 @@ winner-mode
>     Visuwesh>  into windows) so that the changes can be \"undone\" using the
>     Visuwesh>  command `winner-undo'.  By default this one is bound to the key
>     Visuwesh>  sequence \\`C-c <left>'.  If you change your mind (while undoing),
>     Visuwesh> -you can press \\`C-c <right>' (calling `winner-redo')."
>     Visuwesh> +you can press \\`C-c <right>' (calling `winner-redo').
>     Visuwesh> +
>     Visuwesh> +If you use `tab-bar-mode', consider using `tab-bar-history-mode' as
>
> and here we could put a comma before "as"

I've left this part out since I feel the sentence has a different
meaning with this comma.

>From 9e545b047aabeac04b48ca9d3fe6bc592abe418e 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..9d804c4ed28 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
+using `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..67d8b2d6049 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