[Top][All Lists]

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

Re: Hl-line and visual-line

From: David Reitter
Subject: Re: Hl-line and visual-line
Date: Sun, 23 May 2010 19:04:02 -0400

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".

> Users expect logical-order regions.  Logical-order regions may surprise
> the first time you see it, but are easy to get used to, since that's
> the order you read the text you mark.

Yes, that sounds good.  I was just thinking about how marking a region by mouse 
would work; I have seen this with bidirectional text in a NS/Cocoa text edit 
view, and it seems reasonable.  You're probably in a much better position to 
tell what bidi users would expect.


reply via email to

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