[Top][All Lists]

[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 08:30:01 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Eli.

On Thu, Dec 03, 2015 at 09:34:42AM +0200, Eli Zaretskii wrote:
> > Date: Wed, 2 Dec 2015 22:15:34 +0000
> > From: Alan Mackenzie <address@hidden>

> > In my initial investigation of bug #19706, an immediate cause of the
> > failure is clear - `frameset-move-onscreen' executes:

> >     (frame-parameter frame 'left)

> > , but on a tty this parameter is nil.  This is insanity, and was an
> > accident waiting to happen (it has now happened).

> Code that accesses frame parameters should expect any particular
> parameter to appear there, it should be resistant in the face of alist
> elements missing completely.  There are many more frame parameters
> that will never be present in a parameters alist of TTY frames (or any
> other frame, for that matter).

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.

> > The correct values of frame parameters 'left and 'top on a tty cannot be
> > other than 0.

> 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?

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

> > There are two ways of fixing bug #19706:

> > The first is to put in special case handling for missing frame
> > parameters, pray that the same error isn't already programmed into our
> > source anywhere else, and trust our highly skilled hackers never to
> > blunder into the same trap again.

> > The second is to set the frame parameters appropriately for tty's.

> > I think I've made it obvious which course I prefer.

> 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).

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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