From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18195: 24.3.92; window-screen-lines is not accurate Date: Fri, 08 Aug 2014 12:10:44 +0200 Message-ID: <53E4A224.6010000@gmx.at> References: <86tx5r7l1j.fsf@yandex.ru> <53E097F7.5050407@gmx.at> <53E0ABF9.7070506@yandex.ru> <53E0AF08.50300@gmx.at> <831tsvqc3c.fsf@gnu.org> <53E0E2E5.7050306@gmx.at> <83tx5rowop.fsf@gnu.org> <53E0E665.1000206@gmx.at> <83ppgfow0p.fsf@gnu.org> <53E0EC6C.7020504@gmx.at> <83oavzotxz.fsf@gnu.org> <53E0FC15.4060502@gmx.at> <83lhr2q0nt.fsf@gnu.org> <53E1F846.2040105@gmx.at> <83ha1pptrd.fsf@gnu.org> <53E25484.8050909@gmx.at> <83a97hpomm.fsf@gnu.org> <53E269E9.6020004@gmx.at> <83wqalo5q0.fsf@gnu.org> <53E39674.2040507@gmx.at> <83a97gnwhy.fsf@gnu.org> <53E39DA6.80201@gmx.at> <83y4v0mf35.fsf@gnu.org> <53E48D29.1010501@gmx.at> <83iom3mjda.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407492757 9288 80.91.229.3 (8 Aug 2014 10:12:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Aug 2014 10:12:37 +0000 (UTC) Cc: 18195@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 08 12:12:25 2014 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 1XFh9r-0004l0-9c for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Aug 2014 12:12:23 +0200 Original-Received: from localhost ([::1]:50237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFh9o-0007na-KL for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Aug 2014 06:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFh9d-0007mR-LC for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 06:12:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFh9W-0003MX-5O for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 06:12:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFh9W-0003MR-1x for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 06:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XFh9V-0006zb-Iq for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 06:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Aug 2014 10:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18195-submit@debbugs.gnu.org id=B18195.140749266526795 (code B ref 18195); Fri, 08 Aug 2014 10:12:01 +0000 Original-Received: (at 18195) by debbugs.gnu.org; 8 Aug 2014 10:11:05 +0000 Original-Received: from localhost ([127.0.0.1]:34656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFh8a-0006xs-K6 for submit@debbugs.gnu.org; Fri, 08 Aug 2014 06:11:05 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:62688) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFh8Y-0006x4-5d for 18195@debbugs.gnu.org; Fri, 08 Aug 2014 06:11:02 -0400 Original-Received: from [88.117.86.84] ([88.117.86.84]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MTSKd-1Wp3jF11pH-00SRHs; Fri, 08 Aug 2014 12:10:54 +0200 In-Reply-To: <83iom3mjda.fsf@gnu.org> X-Provags-ID: V03:K0:hAJci9IxwmpyvhdV/tZq92k1OEe8CKYP3BlnblA9uQGNoyPBRbb YbwJe+5x1hC5MOBO/zeWOmS9kSO1qnOvlHg34sQoHcV9Jr22P00yK+feNb6QRdBy+raorPz FtR32yZ7Qz8YmiWR1Dw1G0N6FU+pjxfDyJFkEAxf4Scy3oqY1VhuaSstjXMkg4huJTbcJ9q 8JAf8SjQWt1aQwU/UspDQ== X-UI-Out-Filterresults: notjunk:1; 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:92301 Archived-At: > It shouldn't. But AFAIU, this is not what is wanted here, because the > problem is where in the buffer to put the overlay. In the above > example, you put it at point-min, but that position needs to be > _computed_ based on the pixel-size of the text to be put in the > overlay. I'd put the overlay at the desired position right away and check whether it fits (usually it should). If it doesn't, I'd have to remove it and put it somewhere else. I can't imagine a solution where multiple attempts could be avoided. After all, one prior aim seems to be that a certain line of the original text must not be covered by the overlay. Hence, neither aligning the overlay at the bottom or top line of a window seem to work always. > IOW, your suggested solution is incomplete, unless you intend the > application to do some iterative process, each time changing the > position where it puts the overlay and adjusting it in the next > iteration based on the results of window-text-pixel-size. This precisley formulates what the application should do and cannot be avoided IMHO. After all, tooltips and menus seem to face exactly the same problem when the frame is at the bottom of the display. Otherwise, these are better off since they can are not constrained by the edges of the window. martin