Subject: bug#36839: 26.1: unique frame names

From: martin rudalics <[email-masked]>
Date: Wed, 31 Jul 2019 11:13:40 +0200

> I'm using C-x 5 b (M-x select-frame-by-name) to switch between frames
 > and in my case, I would like the names to be more informative than just
 > Fnn. In a more general sense, if emacs is offering the NAME parameter,
 > it should assume the parameter will be used, and currently emacs isn't
 > handling its use well.

I think the current behavior (using the name of the buffer of the
selected window of each frame) works reasonably well as long as the
same buffer doesn't appear in more than one selected window.  It
simply delegates your problem to the buffer naming mechanism.

What you probably want is a mechanism that automatically assigns each
frame an explicit, unique name at creation time.  We could do that
(optionally, because otherwise we would interfere with the default
approach) but would have to invent a suitable naming scheme first.
This is non-trivial because a naive numbering scheme where a user
creates and subsequently deletes many frames might get out of hand
soon.  Such users need a mechanism for recycling the numbers of dead
frames which might confuse other users who rarely create new frames.

You could try putting a function that produces such names in your
early init file, assign the values it produces to each newly created
frame in a lambda you put on 'after-make-frame-functions' and tell us
your experiences.

martin