[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hl-line and visual-line

From: Eli Zaretskii
Subject: Re: Hl-line and visual-line
Date: Mon, 24 May 2010 21:16:13 +0300

> From: David Reitter <address@hidden>
> Date: Sun, 23 May 2010 19:04:02 -0400
> Cc: address@hidden
> On May 23, 2010, at 4:33 PM, Eli Zaretskii wrote:
> > 
> >> The second use case would be to actually capture a whole line.  I have 
> >> functions that kill the whole line (from left to right).   They would use 
> >> `kill-region' from X to Y.   The same goes for hl-line-mode, where ONE 
> >> overlay is drawn.
> >> So, these functions would need a new function such as 
> >> "regions-within-visual-line" or so, returning a list of (from . to) 
> >> regions, or some other means of identifying the region. 
> > 
> > Sorry, I don't get this part.  Can you give an example that uses
> > kill-region and another one with one overlay for hl-line-mode, and
> > explain how the list of the form you mention would help?
> Back to your example, buffer text is "abcde ABCDE FGHIJ xyz", displayed with 
> word-wrap as
> 0) abcde JIHGF
> 1) EDCBA xyz
> Say, point is in line 0, at "c".   Deleting the visual line should delete 
> line 0, which is two portions of text: "abcde" and "FGHIJ".  
> My reference to C-k assumed visual-line-mode semantics, as well, so C-k would 
> delete "de" and "FGHIJ".

Right.  So the main issue here is not where to move point, but rather
how to generate the list of the regions needed for doing something
with the entire visual line.

IOW, we need to introduce a new subroutine (that would produce such a
list), not change beginning/end-of-visual-line.  Do you agree?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]