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: Mon, 14 Jan 2013 19:04:15 +0100 Message-ID: <50F4489F.4090801@gmx.at> 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> <83obgusb4w.fsf@gnu.org> <50F19165.1060600@gmx.at> <83libys5sg.fsf@gnu.org> <50F1A4EC.7090702@gmx.at> <83hamms0us.fsf@gnu.org> 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 1358186753 26229 80.91.229.3 (14 Jan 2013 18:05:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2013 18:05:53 +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 Mon Jan 14 19:06:09 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 1TuoQ5-00048E-3l for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 19:06:01 +0100 Original-Received: from localhost ([::1]:45107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuoPo-0000l9-RK for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 13:05:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuoPl-0000kH-Ok for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:05:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuoPi-000451-Be for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:05:41 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuoPi-00044k-8X for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:05:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TuoQ6-0006bB-DL for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:06: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: Mon, 14 Jan 2013 18:06: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.135818670325251 (code B ref 13399); Mon, 14 Jan 2013 18:06:02 +0000 Original-Received: (at 13399) by debbugs.gnu.org; 14 Jan 2013 18:05:03 +0000 Original-Received: from localhost ([127.0.0.1]:60175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuoP7-0006Yy-Ul for submit@debbugs.gnu.org; Mon, 14 Jan 2013 13:05:02 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:60631) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuoP3-0006YV-Gv for 13399@debbugs.gnu.org; Mon, 14 Jan 2013 13:04:59 -0500 Original-Received: from mailout-de.gmx.net ([10.1.76.32]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MRydg-1TX7fE29t4-00TENN for <13399@debbugs.gnu.org>; Mon, 14 Jan 2013 19:04:26 +0100 Original-Received: (qmail invoked by alias); 14 Jan 2013 18:04:26 -0000 Original-Received: from 62-47-40-2.adsl.highway.telekom.at (EHLO [62.47.40.2]) [62.47.40.2] by mail.gmx.net (mp032) with SMTP; 14 Jan 2013 19:04:26 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18aYC06EWAaxN1mKm7IF0ZNNI6dGCyrWHSy7yirlF ILpbPz+2O3630P In-Reply-To: <83hamms0us.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:69766 Archived-At: > Would something like this be good enough? > > (save-excursion > (move-beginning-of-line 1) > (setq pos1 (posn-at-point))) > (save-excursion > (move-beginning-of-line 2) > (setq pos2 (posn-at-point))) > > Then use the Y member of the returned information in pos1 and pos2. Looks like this should work. But at the moment I'm a bit lost with the information returned by `posn-at-point': What precisely stands the value of (nth 2 (posn-at-point (point-max))) for? If my buffer ends with a newline, is that the value of the lowest pixel of the chararacter box of the character just above the cursor? Can it include line spacing? I wonder because I find this calculation in `posn-col-row' confusing: (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) (if (null (with-current-buffer (window-buffer window) header-line-format)) 0 1)))))))) It does not round values, so the value of rows can be less than needed for showing the entire text. OTOH it seems to apply spacing to the last line of a buffer. Finally, if a buffer wants a headerline, evaluating (posn-col-row (posn-at-point (point-min))) gives (0 . -1). Is that useful? So I'm working with the raw data returned by `posn-at-point' and the results are not worse than with the current approach. But I still seem to lose some pixels somewhere ... martin