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#13399: 24.3.50; Word-wrap can't wrap at zero-width space U-200B Date: Fri, 11 Jan 2013 09:16:45 +0100 Message-ID: <50EFCA6D.7090702@gmx.at> References: <50EE7BE5.2060806@gmx.at> <83hamohmtj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1357892282 20576 80.91.229.3 (11 Jan 2013 08:18:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2013 08:18:02 +0000 (UTC) Cc: 13399@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 11 09:18:19 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 1TtZog-0004Xr-Ik for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2013 09:18:18 +0100 Original-Received: from localhost ([::1]:32914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtZoQ-0007pU-K1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2013 03:18:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtZoM-0007oY-U0 for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2013 03:18:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtZoL-0005p4-AE for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2013 03:17:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtZoL-0005oz-7C for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2013 03:17:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TtZoQ-00046O-DZ for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2013 03:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jan 2013 08:18: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.135789222615694 (code B ref 13399); Fri, 11 Jan 2013 08:18:02 +0000 Original-Received: (at 13399) by debbugs.gnu.org; 11 Jan 2013 08:17:06 +0000 Original-Received: from localhost ([127.0.0.1]:55058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtZnV-000455-Ge for submit@debbugs.gnu.org; Fri, 11 Jan 2013 03:17:05 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:61065) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtZnS-00044S-73 for 13399@debbugs.gnu.org; Fri, 11 Jan 2013 03:17:03 -0500 Original-Received: from mailout-de.gmx.net ([10.1.76.19]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0M7nJe-1T6zTe1ckS-00vSQZ for <13399@debbugs.gnu.org>; Fri, 11 Jan 2013 09:16:50 +0100 Original-Received: (qmail invoked by alias); 11 Jan 2013 08:16:50 -0000 Original-Received: from 62-47-43-86.adsl.highway.telekom.at (EHLO [62.47.43.86]) [62.47.43.86] by mail.gmx.net (mp019) with SMTP; 11 Jan 2013 09:16:50 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/kikg/eQLk0g4q3BoUXMt+opa2FOCziwqcEFAALY exb13anbu9lEOl In-Reply-To: <83hamohmtj.fsf@gnu.org> X-Y-GMX-Trusted: 0 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:69595 Archived-At: >> As can be seen in the window showing *foo*, >> lines are not regularly wrapped at that character. > > You mean, not wrapped at all. Witness the continuation bitmaps in the > fringes, which shouldn't appear when a line is wrapped. I thought these bitmaps appear when a line is wrapped. > If anything, this is a missing feature, since word-wrap is explicitly > coded to break lines only on SPC and TAB characters. The doc-string of `word-wrap' says When word-wrapping is on, continuation lines are wrapped at the space or tab character nearest to the right window edge Since U-200B is a space character the line should wrap at it. Also this character is intended for invisible word separation and for line break control; it has no width, but its presence between two characters does not prevent increased letter spacing in justification and Emacs apparently does handle it specially since it reserves a few pixels when drawing it. But documentation on `word-wrap' is scarce ... > See the > IT_DISPLAYING_WHITESPACE macro in xdisp.c. I tried to understand the code but failed. > If we want to add more characters to the set, we should probably > arrange a special char-table for this, and have it exposed to Lisp, so > it could be customized. Patches are welcome. IIUC all breakable spaces are between U-2000 and U-200B so maybe a character table is not needed. Anway, exposing displayed text to Lisp would be great. We'd just need two functions - one that gets the pixel width of an arbitrary buffer string wrt a specific window, and one that gets the pixel height of an arbitrary buffer string (newlines ignored) wrt a specific window. This way we could get rid of lots of problems currently hidden in the display engine ... martin