From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#14825: 24.3.50; split-window-below miscounts window lines Date: Sat, 13 Jul 2013 17:38:31 +0300 Message-ID: <83mwpq4ja0.fsf@gnu.org> References: <83hag5vszy.fsf@gnu.org> <51DBD33D.4000307@gmx.at> <83bo6bww40.fsf@gnu.org> <51DD0B31.8000901@gmx.at> <83obaav2ug.fsf@gnu.org> <51DE504E.2010804@gmx.at> <834nc1uji4.fsf@gnu.org> <51DFBC95.5040207@gmx.at> <83ehb45eli.fsf@gnu.org> <51DFD6A1.4010904@gmx.at> <837ggv6h5g.fsf@gnu.org> <51E135B0.4@gmx.at> <83sizi4qun.fsf@gnu.org> <51E15CA2.70600@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1373726367 27895 80.91.229.3 (13 Jul 2013 14:39:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Jul 2013 14:39:27 +0000 (UTC) Cc: 14825@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 13 16:39:27 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Uy0yr-00067H-GM for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jul 2013 16:39:25 +0200 Original-Received: from localhost ([::1]:38305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uy0yq-0005jR-WB for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jul 2013 10:39:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uy0yc-0005el-Mp for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 10:39:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uy0yW-0001YC-MN for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 10:39:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uy0yW-0001Xo-GN for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 10:39:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uy0yV-0006kA-Rt for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 10:39:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jul 2013 14:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14825 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14825-submit@debbugs.gnu.org id=B14825.137372634225918 (code B ref 14825); Sat, 13 Jul 2013 14:39:03 +0000 Original-Received: (at 14825) by debbugs.gnu.org; 13 Jul 2013 14:39:02 +0000 Original-Received: from localhost ([127.0.0.1]:52794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uy0yS-0006jt-C3 for submit@debbugs.gnu.org; Sat, 13 Jul 2013 10:39:01 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:49425) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uy0yN-0006jc-09 for 14825@debbugs.gnu.org; Sat, 13 Jul 2013 10:38:56 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MPV00A00PZ5P000@a-mtaout20.012.net.il> for 14825@debbugs.gnu.org; Sat, 13 Jul 2013 17:38:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MPV00A3CQ09F480@a-mtaout20.012.net.il>; Sat, 13 Jul 2013 17:38:33 +0300 (IDT) In-reply-to: <51E15CA2.70600@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76330 Archived-At: > Date: Sat, 13 Jul 2013 15:56:50 +0200 > From: martin rudalics > CC: 14825@debbugs.gnu.org > > >> What is "the actual number of text lines in a window"? > > > > The number of glyph rows visible in the window. > > So this is something that changes with the text displayed in the window > and not only when changing the buffer's default face. No, it doesn't. I meant the number of lines of the default face. > Also, would we then have four different units to measure window heights > - frame lines, pixels, buffer lines, displayed lines? Only 3, not 4. > >> > Which is why we don't need to bother that it will become unreliable, > >> > as it is already there. > >> > >> You mean it's not reliable currently? > > > > Yes. > > In what sense? In the sense that we have been discussing for the last several months. I don't think I need to repeat all that. > I obviously agree because I consider it wrong when changing a > frame's default face can affect its size but I suppose what you have > in mind is something different. If we agree, we don't have to talk about this aspect any more. > > Well, you now have window-screen-lines ;-) > > I haven't looked at it yet. Where is it? In simple.el. If you want to move it to window.el, I won't mind. > Does it accept arbitrary buffer start and end points? It measures in units of the default-face lines, so it doesn't care about where in the buffer are you. > Does it return pixel sizes? No, line sizes. > >> and what I wrote `window-text-pixel-size' for. But this is based > >> on actual line heights, not necessarily those specified by the buffer's > >> default face plus line spacing. And I suppose moving by lines calls for > >> actual line heights too. > > > > Yes, of course. If you need to count in units of the default face and > > also take the line-spacing into consideration, window-screen-lines is > > your friend. > > So we should call `window-screen-lines' before splitting a window? Probably.