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#18195: 24.3.92; window-screen-lines is not accurate Date: Fri, 08 Aug 2014 12:16:33 +0300 Message-ID: <83iom3mjda.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1407489446 1126 80.91.229.3 (8 Aug 2014 09:17:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Aug 2014 09:17:26 +0000 (UTC) Cc: 18195@debbugs.gnu.org, dgutov@yandex.ru To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 08 11:17:16 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 1XFgIW-0000oc-1i for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Aug 2014 11:17:16 +0200 Original-Received: from localhost ([::1]:50039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFgIV-0000Ei-Go for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Aug 2014 05:17:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFgIN-0000EV-Ky for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 05:17:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFgII-0003IA-Ov for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 05:17:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFgII-0003I4-Lq for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 05:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XFgIH-0005gb-OF for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 05:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Aug 2014 09:17: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.140748940621828 (code B ref 18195); Fri, 08 Aug 2014 09:17:01 +0000 Original-Received: (at 18195) by debbugs.gnu.org; 8 Aug 2014 09:16:46 +0000 Original-Received: from localhost ([127.0.0.1]:34615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFgI1-0005fz-Ve for submit@debbugs.gnu.org; Fri, 08 Aug 2014 05:16:46 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:49560) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFgHy-0005fk-K5 for 18195@debbugs.gnu.org; Fri, 08 Aug 2014 05:16:44 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N9Z00400DRJF500@a-mtaout20.012.net.il> for 18195@debbugs.gnu.org; Fri, 08 Aug 2014 12:16:36 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N9Z0046SDRN5J70@a-mtaout20.012.net.il>; Fri, 08 Aug 2014 12:16:36 +0300 (IDT) In-reply-to: <53E48D29.1010501@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:92297 Archived-At: > Date: Fri, 08 Aug 2014 10:41:13 +0200 > From: martin rudalics > CC: dgutov@yandex.ru, 18195@debbugs.gnu.org > > Seriously, why should > > (let ((overlay (make-overlay (point-min) (point-max)))) > (overlay-put overlay 'display "???????") > (prog1 > (window-text-pixel-size) > (delete-overlay overlay))) > > cause a "momentarily flashing in the window"? 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. 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.