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#13399: 24.3.50; Word-wrap can't wrap at zero-width space U-200B Date: Sat, 12 Jan 2013 16:56:31 +0200 Message-ID: <83obgusb4w.fsf@gnu.org> References: <50EE7BE5.2060806@gmx.at> <83hamohmtj.fsf@gnu.org> <50EFCA6D.7090702@gmx.at> <83ip74ume7.fsf@gnu.org> <50EFE99A.5070508@gmx.at> <838v80ugv1.fsf@gnu.org> <50F021EC.4040107@gmx.at> <50F054A0.2040606@gmx.at> <83pq1btu5p.fsf@gnu.org> <50F17365.6050006@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1358002625 23697 80.91.229.3 (12 Jan 2013 14:57:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2013 14:57:05 +0000 (UTC) Cc: 13399@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 15:57:22 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 1Tu2WQ-0005k9-70 for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jan 2013 15:57:22 +0100 Original-Received: from localhost ([::1]:41878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu2W9-0005xe-Hh for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jan 2013 09:57:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu2W4-0005xO-HS for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2013 09:57:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tu2Vw-0008Qi-Mz for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2013 09:57:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu2Vw-0008Qe-J1 for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2013 09:56:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tu2W6-0000E0-Oj for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2013 09:57:04 -0500 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: Sat, 12 Jan 2013 14:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13399-submit@debbugs.gnu.org id=B13399.1358002615858 (code B ref 13399); Sat, 12 Jan 2013 14:57:02 +0000 Original-Received: (at 13399) by debbugs.gnu.org; 12 Jan 2013 14:56:55 +0000 Original-Received: from localhost ([127.0.0.1]:57080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu2Vl-0000Dn-Ok for submit@debbugs.gnu.org; Sat, 12 Jan 2013 09:56:48 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:36919) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu2VW-0000De-O3 for 13399@debbugs.gnu.org; Sat, 12 Jan 2013 09:56:30 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MGI00M00PDKDC00@a-mtaout20.012.net.il> for 13399@debbugs.gnu.org; Sat, 12 Jan 2013 16:56:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGI00MNGPHJ3Y70@a-mtaout20.012.net.il>; Sat, 12 Jan 2013 16:56:07 +0200 (IST) In-reply-to: <50F17365.6050006@gmx.at> 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.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:69663 Archived-At: > Date: Sat, 12 Jan 2013 15:29:57 +0100 > From: martin rudalics > CC: monnier@iro.umontreal.ca, 13399@debbugs.gnu.org > > > Very simply: it simulates the display. See pos_visible_p (which > > posn-at-point calls). That's what I meant when I said that doing this > > for determining the line width or height should be easy. > > Here I see the following call sequences: > > `fit-window-to-buffer' > -> `count-screen-lines' -> `vertical-motion' -> move_it_to > -> `pos-visible-in-window-p' -> pos_visible_p -> move_it_to > > So everything `fit-window-to-buffer' does ends up calling move_it_to and > the loop called via `pos-visible-in-window-p' is likely silly. fit-window-to-buffer should probably call pos-visible-in-window-p with argument PARTIALLY non-nil, and then it should be possible to get rid of the loop. > Using > > `posn-at-point' -> `pos-visible-in-window-p' -> pos_visible_p -> move_it_to > > `window-end' -> move_it_vertically -> move_it_to > > probably won't produce anything else. This means that somehow > move_it_to fails to DTRT here. If you can show a case where it fails, it should be possible to fix it. OTOH, it could be that these Lisp tricks try to work around failures in move_it_to that were already fixed. > I don't have a deterministic scenario to produce the bug. I attach a > file you can try via `eval-buffer' followed by M-x foo. After that > you'd have to resize the frame randomly (usually shrinking it > vertically) until it hides the last line(s) of the *foo* window. This > usually takes a few seconds here. > > The hiding does not occur when I do not draw a box around characters. I > didn't try different character heights, bold face, etc. so far. Note > that in normal work I use a maximized frame and the bug shows up > frequently when changing text in *foo* (using another hook) or the > window configuration. I think what you see only happens when the last line is partially visible (where "partially" might mean just one of its pixels). If that is not desirable, then we will need to be more accurate when we say "visible" and have a more precise definition of what exactly constitutes a window's height when a single line, in particular the last one, might have characters of different descent values. In any case, this is a failure in fit-window-to-buffer, if anything, it is not necessarily an evidence that move_it_* functions fail.