From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Missing frame parameters on tty's Date: Thu, 3 Dec 2015 08:30:01 +0000 Message-ID: <20151203083001.GA2136@acm.fritz.box> References: <20151202221534.GC2318@acm.fritz.box> <83vb8ghtnx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1449131309 10915 80.91.229.3 (3 Dec 2015 08:28:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2015 08:28:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 03 09:28:20 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a4PFN-00078n-At for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2015 09:28:13 +0100 Original-Received: from localhost ([::1]:33984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4PFM-0005NB-Eb for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2015 03:28:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4PF9-0005Ku-F4 for emacs-devel@gnu.org; Thu, 03 Dec 2015 03:28:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4PF5-0001yQ-Fd for emacs-devel@gnu.org; Thu, 03 Dec 2015 03:27:59 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:24148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4PF5-0001y9-79 for emacs-devel@gnu.org; Thu, 03 Dec 2015 03:27:55 -0500 Original-Received: (qmail 21062 invoked by uid 3782); 3 Dec 2015 08:27:54 -0000 Original-Received: from acm.muc.de (p579E903F.dip0.t-ipconnect.de [87.158.144.63]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 03 Dec 2015 09:27:53 +0100 Original-Received: (qmail 2500 invoked by uid 1000); 3 Dec 2015 08:30:01 -0000 Content-Disposition: inline In-Reply-To: <83vb8ghtnx.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195801 Archived-At: 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 > > 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).