emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: should frame names be unique?


From: Drew Adams
Subject: RE: should frame names be unique?
Date: Fri, 21 Mar 2008 19:34:28 -0700

> >> I'm not opposed to making frame names unique, but first, 
> >> I'd like to hear about the use-cases where it matters.
> 
> > Think of the Frames menu.  If you have multiple frames
> > showing the same buffer, then you will have multiple
> > identical entries in the Frames menu.  No way to know which
> > is which, which makes them pretty useless.
> 
> Yup, pretty useless.  So if it hurts, don't do that.

That was my reaction at first, also. But I now think it makes more sense to give
frames unique names - just as we do with buffers.

> >> I.e. what uses of frame-names are we talking about
> >> (select-frame-by-name?  The Frames menu?)?
> 
> > Yes, both. Though select-frame-by-name apparently removes
> > duplicates, so AFAICT it doesn't even let you select some of
> > the frames (a bug?).
> 
> Not a bug: a fundamental limitation of the command: you can't 
> select by name and at the same time distinguish between two
> objects that have the same name.

That's just describing the bug/limitation (the status quo)! That's exactly the
point.

The frame objects are individual, unique, and it is appropriate that they have
unique names, so that you can select a given object by name.

> > (The example that brought this up was an Icicles
> > multi-command version of select-frame-by-name.)
> 
> Yes, but I don't know where it fits: if it just creates 
> different names
> in the names-list without actually changing the frame names, then the
> problem is the same as the Frames menu: you can select any frame, but
> you have no way to know beforehand which name corresponds to 
> which frame (among those that have the same name).

No, each frame has a unique way of referring to it, this way. This is no
different from buffer names. If you have three buffers visiting files named foo,
then you have three buffer names, foo, foo<2>, and foo<3>. It doesn't take you
long to get used to which is which, that is, which buffer name corresponds to
which file foo.

But yes, it would be preferable for the frames themselves to have these unique
names. Then you would not only refer to them by name via some
select-frame-by-name command, but you would also see the name in the frame title
bar, and the name would be the actual frame parameter. That is the point of my
suggestion, not to implement another stop-gap like what the Icicles command
provides.

> >> What is the difference between those frames showing the same buffer
> >> (is it just to display two different parts of a buffer, if 
> >> so do the various frames play different roles?  Are they on 
> >> different screens? Can you see their names in the title bar? ...)
> 
> > I can't answer any of those questions.
> 
> So you're not faced with this problem in practice.  It's just
> a hypothetical issue?

You're asking me what the difference was between Damon's frames in practice and
how he was using them differently. How can I answer that? 

But I didn't just say I couldn't answer it - I referred the question to Damon,
who can, presumably.

However, I don't think the user-specific practical difference is important. For
whatever reason, Mr X or Ms Y has multiple frames with the same name, but wants
to use them differently. Whether each shows the same buffer with a different
view, or they show different buffers but have the same frame name for some other
reason (e.g. machine name, date, whatever), or for any other reason. _If_ you
have multiple frames with the same name, it is likely that you have multiple
frames for a reason - they have _different uses for you_, whatever those uses
might be.

Damon has multiple frames, each named after the same buffer. The frames are
different _to him_ in some way - perhaps one of the ways you asked about. But
the frame names do not distinguish the frames in any way. That's too bad.

Even a unique name with no meaning (e.g., 1, 2, 3,...) would at least let you
distinguish the frames. Better would be to combine the existing frame name with
this, to give a unique name that is not totally meaningless.

That's all. Some way to distinguish is better than no way to distinguish. The
rationale is the same as for buffer names, as I see it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]