From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible Date: Fri, 10 Jul 2015 21:19:18 +0200 Message-ID: <87h9pbzuq1.fsf@web.de> References: <87twteh65g.fsf@web.de> <83d202v2m2.fsf@gnu.org> <87wpya5rey.fsf@web.de> <83a8v6ukbe.fsf@gnu.org> <834mlduyz8.fsf@gnu.org> <87egkh3xl3.fsf@web.de> <83pp40blcq.fsf@gnu.org> <874mlcgoka.fsf@web.de> <83bnfkb1rs.fsf@gnu.org> <87pp40nlnj.fsf@web.de> <838uaoax9a.fsf@gnu.org> <87fv4vsxc4.fsf@web.de> <837fq7c0n6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436556033 23876 80.91.229.3 (10 Jul 2015 19:20:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2015 19:20:33 +0000 (UTC) Cc: 21012@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 10 21:20:17 2015 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 1ZDdqH-0000LU-TU for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jul 2015 21:20:14 +0200 Original-Received: from localhost ([::1]:45888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDdqH-0000oF-1y for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jul 2015 15:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDdqD-0000oA-PJ for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 15:20:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDdq7-0004zV-RG for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 15:20:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDdq7-0004yu-Nv for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 15:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZDdq7-0003xn-5W for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 15:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jul 2015 19:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21012-submit@debbugs.gnu.org id=B21012.143655597115161 (code B ref 21012); Fri, 10 Jul 2015 19:20:03 +0000 Original-Received: (at 21012) by debbugs.gnu.org; 10 Jul 2015 19:19:31 +0000 Original-Received: from localhost ([127.0.0.1]:46423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDdpa-0003wS-H8 for submit@debbugs.gnu.org; Fri, 10 Jul 2015 15:19:30 -0400 Original-Received: from mout.web.de ([212.227.15.14]:49475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDdpY-0003w6-7o for 21012@debbugs.gnu.org; Fri, 10 Jul 2015 15:19:28 -0400 Original-Received: from drachen.dragon ([2.207.230.40]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LaTdP-1YZw183rKR-00mIJy; Fri, 10 Jul 2015 21:19:22 +0200 In-Reply-To: <837fq7c0n6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 10 Jul 2015 21:45:17 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:yQTuS65TMUeSF/nmCKwwW+nkhbR0+62Z6Oa/72eEHm5gmDiNlkd hfiIYqqbsOC+iv654t67doTFVE3WcI0jiE+gcq/ws6JsY7b2QZXVYueOrNsunv+5CzYqBaN ozxhtSQmQXfK/LSRI2Nk7BpXCMVleYYdsUUnzE+I4bgPYLhEfOd0keQ6bEdNDYosiQox2pf giaJHQH3WxlbYX2+O6bEQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:3asQ2uLoDRg=:TVC1Tea9vgMXajv0ZP/uRf lu81s0OxXvw/13/Hm/EUJz/pvqA40Q1FYq3/oB3HI+15nPJG+C/z6jhishFs70ofQa3DYhjyc Dz2Wg05+/hgFedW+BJBXGHnmftBlPLsbALWLXLkNmzZBx7RTnYj3oTknfJ8sCfnJwSvZfDUq5 GUE/p6BsBjM24//pvwR8WkRHwS9+nCQYHqz66YNEo22hVg2t2P/+VWlr+T6NeAC51QiCaQ69b RSAvBwEeiuRGcDFT9YTXu3wmU+HqIu9gEK+PeK5Aqb7XYqA23dMZLhFqbsu1SQEA4BMk3CvH9 eHeGS0lqehL03XYiBP5VQp8BqZU/KGZn8xBHMAR0e1aWBe0awDFa09AevIO1H0B9sNVMvetjY ym9W4Q9OGF5Z6h6fTLdjKJODdOT9RbeXrdCCRXOZaDI7uFxajaG0iJXzepUmgbspFUnX7jQSO 2Am8AYZFUUepFpIhM7FfdsAnEQ9/hQujaZjecb/eEnbiky+3joYT4MgiFMS99B6dCB1KVtBR1 zDmCCoDls5nn06R1kktboMhQlYT2yRrJvcYwqbtkBM2N8ZcVVpJIVZhGhOuuhRtKxnvwjhdGu VlkfsK0OML3STrewQPZx2kuBrVK3p0PexdeksAyaK0DqxmTqirScmZnrG0+FSJYoEmJvzrelX Es3PLAccKoaphotvr6YZlSUwhxNfK477pjPXP9US/3vbKzyzzppplQDn2KudsI1jzkTk= 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:104899 Archived-At: Eli Zaretskii writes: > > Can't we find the position of the last completely visible char of a > > line with > > > > --8<---------------cut here---------------start------------->8--- > > (save-excursion > > (let ((truncate-lines nil)) > > (when (line-move-visual +1 t) > > (backward-char 1)) > > (point))) > > --8<---------------cut here---------------end--------------->8--- > > I'd prefer to exchange ideas rather than code that I need to second > guess. So what's the idea behind this? > > Is the idea to turn off truncate-lines and thus avoid partially > visible characters at end of line? I thought this is obvious. > If so, how do you find the last visible character? Doing what you > suggest above won't work with bidirectional text, where (backward-char > 1) from the leftmost character of a visual line doesn't necessarily > put you on the last character of the previous visual line. I think > you need to let-bind visual-order-cursor-movement to t and invoke > left-char instead. Ok. > Next, line-move-visual will only move to the leftmost character of the > next line if you are already on the leftmost character of the current > line, so you'd need to make that happen first. Not hard to do, but > should be part of the code, or maybe I'm missing something. I missed that because I always have goal-column -> 0. > Finally, portions of line-move-visual and its subroutines only work > when the line is visible in some window, so won't that again hit the > same limitation of posn-at-point? I don't know. That's why the last sentences in my message were questions. But are you sure that `vertical-motion' does not hit that limitation? For example, AFAIK `vertical-motion' stops at the end of a visual line if the first arg is a cons cell with COLS larger than available cols in the line. How does that work when that line is not displayed somewhere? Michael.