From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#18195: 24.3.92; window-screen-lines is not accurate Date: Tue, 05 Aug 2014 17:05:20 +0400 Message-ID: <53E0D690.1030208@yandex.ru> References: <86tx5r7l1j.fsf@yandex.ru> <53E097F7.5050407@gmx.at> <53E0ABF9.7070506@yandex.ru> <53E0AF08.50300@gmx.at> <53E0B0FB.3080203@yandex.ru> <53E0CC2A.7040801@gmx.at> 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 1407244006 26935 80.91.229.3 (5 Aug 2014 13:06:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2014 13:06:46 +0000 (UTC) To: martin rudalics , 18195@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 05 15:06:35 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 1XEeRc-0003aa-PQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 15:06:25 +0200 Original-Received: from localhost ([::1]:59345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEeRc-00018x-8I for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 09:06:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEeRQ-00017P-4G for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 09:06:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEeRH-0000nx-EB for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 09:06:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEeRH-0000nF-Ai for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 09:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XEeRG-0000PG-IJ for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 09:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2014 13:06:02 +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.14072439361520 (code B ref 18195); Tue, 05 Aug 2014 13:06:02 +0000 Original-Received: (at 18195) by debbugs.gnu.org; 5 Aug 2014 13:05:36 +0000 Original-Received: from localhost ([127.0.0.1]:58336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEeQp-0000OR-5C for submit@debbugs.gnu.org; Tue, 05 Aug 2014 09:05:35 -0400 Original-Received: from mail-la0-f45.google.com ([209.85.215.45]:48576) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEeQl-0000O6-C6 for 18195@debbugs.gnu.org; Tue, 05 Aug 2014 09:05:32 -0400 Original-Received: by mail-la0-f45.google.com with SMTP id ty20so691042lab.18 for <18195@debbugs.gnu.org>; Tue, 05 Aug 2014 06:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ck+o7rtax3RWxQsclscIfVwepD18jVbzXgkHJ/eAcc8=; b=Yaisz9cQKm5Hy6Lh1PEIKmjkIH7GW5qpBXiSnOUgseP8CFpEt5GrXJRCDnW+xcIUbV KX1XVEv5rK6Oro6MCqWshXDFAEvQglVs5oA67uYER64PzvwsHwbGs7czFcbawmvOVuaF kPLfQuZhxLUZtun8c+VGfQuEuoGcBmgD/WJGCYvVbmlK00ud7kvJQMFtwVLcb+qeoqWC vZ80OCfVaRFgPblEZ9as4G826Nn9Fht4qSv4GDUFcm2oFIYHII4ot0egnEpOSb9EZwLA lxAQ1Buo2X501z6B0s+VVNmKhe8xyX/6mDSlrc9AoJbPoGH5XRTRmGdFe9jHgWE5PqL9 NxWQ== X-Received: by 10.152.42.175 with SMTP id p15mr3874841lal.73.1407243925183; Tue, 05 Aug 2014 06:05:25 -0700 (PDT) Original-Received: from [10.8.0.26] (v-2-eu19-d3962-07.webazilla.com. [78.140.151.7]) by mx.google.com with ESMTPSA id u12sm893070laz.47.2014.08.05.06.05.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Aug 2014 06:05:24 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <53E0CC2A.7040801@gmx.at> 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:92130 Archived-At: On 08/05/2014 04:20 PM, martin rudalics wrote: > > It won't help to determine how much space is left below the current > line if the current line is the last in the buffer but not in the > window, right? > > You have to calculate the height of the text from window start till the > end of the buffer and subtract the result from the window's text height. Suppose I do that. When do I convert any of the resulting values to number of lines? Please remember, we're using an overlay for popup rendering. Overlays work with lines of text. > `count-screen-lines' doesn't return a pixel value. How do you get that > with lines of different heights and line spacing? As above, we really don't need a pixel value in the end result. If the overlay is made to span over lines with different heights and lines spacing, we can either make it follow all those dimensions, or override them to the same values. But while we can do that, ignoring the global value of line-spacing wouldn't be comfortable for users that have it set. > It again just returns a line value. IIRC someone has set the font size > to 1 pixel to make this return something reasonable. But why do all > these acrobatics? `window-text-pixel-size' should give you everything > you need in a uniform way. And if something's missing we can easily add > it. See above. By the way, `window-screen-lines' not being accurate doesn't seem to be directly caused by pixel-perfect positioning. If I copy the necessary definitions (the 3 new function) to Emacs 24.3, it exhibits the same problem.