From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Missing frame parameters on tty's
Date: Thu, 3 Dec 2015 08:30:01 +0000 [thread overview]
Message-ID: <20151203083001.GA2136@acm.fritz.box> (raw)
In-Reply-To: <83vb8ghtnx.fsf@gnu.org>
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 <acm@muc.de>
> > 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).
next prev parent reply other threads:[~2015-12-03 8:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 22:15 Missing frame parameters on tty's Alan Mackenzie
2015-12-02 23:07 ` Juanma Barranquero
2015-12-03 7:34 ` Eli Zaretskii
2015-12-03 8:30 ` Alan Mackenzie [this message]
2015-12-03 10:27 ` Eli Zaretskii
2015-12-03 11:18 ` Alan Mackenzie
2015-12-03 11:34 ` Eli Zaretskii
2016-01-18 16:02 ` Alan Mackenzie
2016-01-18 16:11 ` Eli Zaretskii
2016-01-18 17:03 ` Alan Mackenzie
2016-01-18 17:07 ` Eli Zaretskii
2016-01-18 17:55 ` Alan Mackenzie
2016-01-18 18:41 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151203083001.GA2136@acm.fritz.box \
--to=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).