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#11464: 24.1.50; pos-visible-in-window-p returns a false positive with bidi text Date: Fri, 18 May 2012 14:32:29 +0300 Message-ID: <83sjexsp0y.fsf@gnu.org> References: <87y5owjcto.fsf@gmail.com> <83pqa8vsxw.fsf@gnu.org> <87fwb1dagj.fsf_-_@gmail.com> <83wr4do1qv.fsf@gnu.org> <87bolor98t.fsf@gmail.com> <83sjf0nolt.fsf@gnu.org> <87pqa3csuc.fsf@gmail.com> <83likqojxl.fsf@gnu.org> <83fwayo6mz.fsf@gnu.org> <83ehqindec.fsf@gnu.org> <87wr49ex07.fsf@gmail.com> <83vcjtswst.fsf@gnu.org> <87obplepfl.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1337340841 31089 80.91.229.3 (18 May 2012 11:34:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 May 2012 11:34:01 +0000 (UTC) Cc: 11464@debbugs.gnu.org, mwd@cert.org To: Ari Roponen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 18 13:33:59 2012 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 1SVLRU-0002F3-7q for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 May 2012 13:33:56 +0200 Original-Received: from localhost ([::1]:38333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVLRT-0006EK-Jn for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 May 2012 07:33:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVLRL-0006Dy-1l for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 07:33:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVLRF-00010B-Lk for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 07:33:46 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVLRF-000104-I4 for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 07:33:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SVLRZ-0007EN-HK for bug-gnu-emacs@gnu.org; Fri, 18 May 2012 07:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 May 2012 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11464-submit@debbugs.gnu.org id=B11464.133734079627740 (code B ref 11464); Fri, 18 May 2012 11:34:01 +0000 Original-Received: (at 11464) by debbugs.gnu.org; 18 May 2012 11:33:16 +0000 Original-Received: from localhost ([127.0.0.1]:60260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVLQp-0007DK-JM for submit@debbugs.gnu.org; Fri, 18 May 2012 07:33:15 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60864) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVLQX-0007CF-5L for 11464@debbugs.gnu.org; Fri, 18 May 2012 07:32:57 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M4700J00UM4IT00@a-mtaout22.012.net.il> for 11464@debbugs.gnu.org; Fri, 18 May 2012 14:32:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4700JHUUQ5FR20@a-mtaout22.012.net.il>; Fri, 18 May 2012 14:32:29 +0300 (IDT) In-reply-to: <87obplepfl.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:60173 Archived-At: > From: Ari Roponen > Cc: mwd@cert.org, 11464@debbugs.gnu.org > Date: Fri, 18 May 2012 13:47:26 +0300 > > Eli Zaretskii writes: > > > And if that happens, the correction code below, viz.: > > > > if (bottom_y <= it.last_visible_y > > && it.bidi_p && it.bidi_it.scan_dir == -1 > > && IT_CHARPOS (it) < charpos) > > > > would evaluate to false, and visible_p would have stayed at its 1 > > value, which is wrong. > > > > So could you please clarify this case? > > Yes, pos_visible_p indeed returns incorrect value (1), but it is called > from Fpos_visible_in_window_p, which returns the correct value. For > longer description, see below. OK, but pos_visible_p is called from other places, and needs to produce a correct result by itself. > > Also, what was the value of top_y in your first case, i.e.: > > > >> bottom_y = 300 > >> it.last_visible_y = 304 > > That case has the following values now (in emacs-24 rev. 108005): > > bottom_y = 302 > it.last_visible_y = 304 > top_y = 285 Very strange, for both 300 and 302. These values seem to imply that the screen line where we wind up spans pixel coordinates [285..302], which means move_it_to didn't get to its goal coordinate 303. What are the values of it.max_ascent and it.max_descent in this case, at the point where the move_it_to call on line 1287 returns? > I'm not sure why bottom_y has changed its value. I guess that is > because I installed some new fonts. That's okay, they both puzzle me alike. Thanks.