Subject: bug#76980: [PATCH] 'window-state-normalize-buffer-name' variable for `uniquify' buffers

From: Ship Mints <[email-masked]>
Date: Fri, 14 Mar 2025 10:54:05 -0400

On Fri, Mar 14, 2025 at 10:45 AM Robert Pluim <[email-masked]> wrote:

> >>>>> On Fri, 14 Mar 2025 10:26:28 -0400, Ship Mints <[email-masked]>
> said:
>     Ship> ++++
>     Ship> +*** New variable 'window-state-normalize-buffer-name'.
>     Ship> +When bound to non-nil, 'window-state-get' will normalize buffer
> names by
>     Ship> +removing 'uniquify' adornments, otherwise using nominal buffer
> names.
>     Ship> +This helps restore window buffers across Emacs sessions.
>     Ship> +
>
> This sounds like it could be useful as a user option rather than a
> `defvar', no? Or perhaps a buffer-local variable?
>

To me, this is a programmatic concern and only the program understands the
context in which it is called.  In a sense, this is buffer-local equivalent
as uniquify-managed is itself buffer-local.  If this is made global, I
sense there may be window-state-get uses that depend on uniquify names but
since I can't survey the field, I think this would be dangerous.  We can
always promote this to a user option later.