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 11:18:15 +0000 Message-ID: <20151203111815.GE2136@acm.fritz.box> References: <20151202221534.GC2318@acm.fritz.box> <83vb8ghtnx.fsf@gnu.org> <20151203083001.GA2136@acm.fritz.box> <83oae7j07y.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 1449141384 12241 80.91.229.3 (3 Dec 2015 11:16:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2015 11:16:24 +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 12:16:16 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 1a4Rs0-0002ZR-6O for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2015 12:16:16 +0100 Original-Received: from localhost ([::1]:34612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Rrz-0001w2-OI for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2015 06:16:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Rrw-0001vH-Uo for emacs-devel@gnu.org; Thu, 03 Dec 2015 06:16:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4Rrs-00056w-Ub for emacs-devel@gnu.org; Thu, 03 Dec 2015 06:16:12 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:29809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Rrs-00054h-Kj for emacs-devel@gnu.org; Thu, 03 Dec 2015 06:16:08 -0500 Original-Received: (qmail 58322 invoked by uid 3782); 3 Dec 2015 11:16:07 -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 12:16:06 +0100 Original-Received: (qmail 3172 invoked by uid 1000); 3 Dec 2015 11:18:15 -0000 Content-Disposition: inline In-Reply-To: <83oae7j07y.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:195807 Archived-At: 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: emacs-devel@gnu.org > > From: Alan Mackenzie [ .... ] > > 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).