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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 15 Mar 2025 14:21:50 +0200

> From: Ship Mints <[email-masked]>
> Date: Fri, 14 Mar 2025 10:26:28 -0400
> Cc: [email-masked]
> 
> +Bind @code{window-state-normalize-buffer-name} to non-@code{nil} to
> +normalize buffer names under @file{uniquify} management by removing its
> +adornments, otherwise using nominal buffer names.  This helps restore
   ^^^^^^^^^^
I'd use a simpler "prefixes and suffixes" here.

And what is the "otherwise using nominal buffer names" part about?

> ++++
> +*** New variable 'window-state-normalize-buffer-name'.
> +When bound to non-nil, 'window-state-get' will normalize buffer names by
> +removing 'uniquify' adornments, otherwise using nominal buffer names.
> +This helps restore window buffers across Emacs sessions.

Same here.

> +(defun window--state-normalize-buffer-name (buffer)
> +  "Normalize BUFFER name, accommodating `uniquify'.
> +If BUFFER is under `uniquify' management, return its `buffer-name' with
> +adornments removed; otherwise return BUFFER `buffer-name'."

And here.

Thanks.