all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21012@debbugs.gnu.org
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	[thread overview]
Message-ID: <87h9pbzuq1.fsf@web.de> (raw)
In-Reply-To: <837fq7c0n6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 10 Jul 2015 21:45:17 +0300")

Eli Zaretskii <eliz@gnu.org> 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.





  reply	other threads:[~2015-07-10 19:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 18:10 bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible Michael Heerdegen
2015-07-08 20:03 ` Eli Zaretskii
2015-07-08 20:24   ` Michael Heerdegen
2015-07-09  2:38     ` Eli Zaretskii
2015-07-09 11:01       ` Michael Heerdegen
2015-07-09 14:43         ` Eli Zaretskii
2015-07-09 19:42           ` Michael Heerdegen
2015-07-09 15:34       ` Eli Zaretskii
2015-07-09 20:06         ` Michael Heerdegen
2015-07-10  6:03           ` Eli Zaretskii
2015-07-10 12:55             ` Michael Heerdegen
2015-07-10 13:06               ` Eli Zaretskii
2015-07-10 14:16                 ` Michael Heerdegen
2015-07-10 14:43                   ` Eli Zaretskii
2015-07-10 18:04                     ` Michael Heerdegen
2015-07-10 18:45                       ` Eli Zaretskii
2015-07-10 19:19                         ` Michael Heerdegen [this message]
2015-07-10 19:31                           ` Eli Zaretskii
2015-07-11 12:02                             ` Michael Heerdegen
2015-07-11 13:45                               ` Eli Zaretskii
2015-07-20 16:33                                 ` Michael Heerdegen
2015-07-20 16:34                                   ` Eli Zaretskii
2015-07-21 18:49                                     ` Michael Heerdegen
2015-09-25  4:00                                       ` Katsumi Yamaoka
2015-09-25 14:45                                         ` Michael Heerdegen
2015-09-28 21:30                                           ` Michael Heerdegen
2015-09-29  5:37                                             ` Eli Zaretskii
2015-10-03  8:08                                               ` Michael Heerdegen
2015-10-03  9:42                                                 ` Eli Zaretskii
2015-10-03 12:41                                                   ` Michael Heerdegen
2015-10-04  6:31                                                     ` Michael Heerdegen
2015-10-04  7:09                                                       ` Eli Zaretskii
2015-10-04  7:11                                                       ` Michael Heerdegen
2015-10-04  7:39                                                         ` Michael Heerdegen
2015-10-04  8:49                                                           ` Eli Zaretskii
2015-10-04 10:18                                                             ` Michael Heerdegen
2015-07-08 20:31   ` Michael Heerdegen
2015-10-07  6:34 ` bug#21012: Close Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9pbzuq1.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=21012@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.