GNU bug report logs - #76980
[PATCH] 'window-state-normalize-buffer-name' variable for `uniquify' buffers

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Wed, 12 Mar 2025 16:47:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 76980 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76980 <at> debbugs.gnu.org
Subject: Re: bug#76980: [PATCH] 'window-state-normalize-buffer-name' variable
 for `uniquify' buffers
Date: Sun, 16 Mar 2025 17:28:53 -0400
[Message part 1 (text/plain, inline)]
On Sat, Mar 15, 2025 at 8:21 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Fri, 14 Mar 2025 10:26:28 -0400
> > Cc: 76980 <at> debbugs.gnu.org
> >
> > +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.
>

Refined patch attached.
[Message part 2 (text/html, inline)]
[0001-window-state-normalize-buffer-name-option-for-uniqui.patch (application/octet-stream, attachment)]

This bug report was last modified 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.