[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: |
Sun, 23 May 2010 23:33:02 +0300 |
> From: David Reitter <address@hidden>
> Date: Sun, 23 May 2010 15:13:42 -0400
> Cc: address@hidden,
> address@hidden
>
> The first use case would be to jump to beginning and end of a visual line.
> That means, if point is at any of {abcde JIHGF}, beginning would be at "a"
> and the end at " " (between "E " and "F").
> If point is at any of {ABCDE xyz}, then beginning would be at "E" and end
> would be after "z".
This already works today, so no change seems to be needed to cover
this.
> C-k (kill-visual-line) would probably need to be rewritten anyway.
Why? it seems to work already, killing the visual line. Am I missing
something?
> 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?
> Are we going to have discontinuous regions? When I set the Mark at "c" in
> your example, and point at "G", what is highlighted (transient-mark-mode),
> and what is killed?
Both the region and kill commands work in logical order. So after
C-w, you will see
ab JIHG xyz
I don't think we should have discontinuous regions. Their semantics
is not clear (there's more than one way of interpreting them), and no
bidi-aware application I've seen supports them.
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.
> (NB You're throwing some of the most basic assumptions away. This could get
> interesting.)
Yes, I'm in this "interesting" stuff for several months now.
- Hl-line and visual-line, David Reitter, 2010/05/20
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/20
- Re: Hl-line and visual-line, David Reitter, 2010/05/20
- Re: Hl-line and visual-line, Tassilo Horn, 2010/05/21
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/21
- Re: Hl-line and visual-line, Tassilo Horn, 2010/05/21
- Re: Hl-line and visual-line, David Reitter, 2010/05/21
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/21
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/23
- Re: Hl-line and visual-line, David Reitter, 2010/05/23
- Re: Hl-line and visual-line,
Eli Zaretskii <=
- Re: Hl-line and visual-line, David Reitter, 2010/05/23
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/24
- Re: Hl-line and visual-line, Stefan Monnier, 2010/05/24
- Re: Hl-line and visual-line, Lennart Borgman, 2010/05/24
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/24
- Re: Hl-line and visual-line, Lennart Borgman, 2010/05/24
- Re: Hl-line and visual-line, David Reitter, 2010/05/24
- Re: Hl-line and visual-line, Lennart Borgman, 2010/05/24
- Re: Hl-line and visual-line, Lennart Borgman, 2010/05/21
- Re: Hl-line and visual-line, Eli Zaretskii, 2010/05/21