emacs-devel
[Top][All Lists]
Advanced

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

Re: Missing frame parameters on tty's


From: Alan Mackenzie
Subject: Re: Missing frame parameters on tty's
Date: Thu, 3 Dec 2015 11:18:15 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Eli.

On Thu, Dec 03, 2015 at 12:27:45PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 3 Dec 2015 08:30:01 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>

[ .... ]

> > Yes, there are 56 frame parameters on an X Emacs I just fired up, and 19
> > on my Linux tty session.  I'm not suggesting the numbers should be made
> > equal - rather that the two particular parameters 'top and 'left should
> > be present in all frames.

> Why single out those two?

Because they're the two over which a misunderstanding has happened.  I
actually have another theory on that (see below).

> Especially since it make no sense at all to have them on TTY frames.

I think it does.  A tty frame's top left corner starts 0 "pixels" from
the top and from the left of the screen.  To have them on a TTY avoids
the need for two special cases (GUI and TTY) when handling 'top, 'left,
'height, and 'width.

> > > Yes, and since a TTY frame cannot be moved anyway, the code in
> > > question should already make a special case for such frames.

> > We have an error here because a special case wasn't made, and it is
> > understandable that it wasn't made - the best of us are only human, after
> > all.  Who on earth would think that only half of the "geometry
> > parameters" would be present?

> You don't need to think about this specifically.  You need to be
> prepared to handle the case that the frame parameter -- any frame
> parameter -- is missing from the parameters' alist.

OK, in theory: I'll take your word for it, if you tell me this is
generally done in practice too.

> > The thing is, this error is going to happen again, at some stage.  We
> > could prevent this now.

> But the same could happen with any other parameter that is missing on
> TTY frames, no?

Not with most of them, no.  Many are so obviously irrelevant to TTY
frames that nobody would think about using them (like those in Elisp
chapter "Window Management Parameters")

> > > I hope I explained why I disagree with you.

> > I don't think you have.  You haven't pointed out any disadvantage in a
> > tty frame having (top . 0) and (left . 0).

> I just don't understand what makes these two frame parameters special.

That their absence has already caused an error.  I think it is intutively
more likely that these two will cause such a misunderstanding than any
others absent from a TTY.

Anyhow, I've been reading the "Window Frame Parameters" chapter in the
Elisp manual, in particular "Position Parameters".  The description of
`left' and `top' immediately follow a statement that measurements on a
TTY are in terms of characters or lines.  This cannot help but give the
impression `left' and `top' _are_ available on TTYs.  Perhaps if we
aren't going to give TTYs these parameters, we should amend that manual
page to say explicitly that TTYs don't have them.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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