* Someting with Emacs visual-line-mode
@ 2010-09-13 2:22 fanq
2010-09-13 15:54 ` Tim Visher
2010-09-13 20:58 ` Lennart Borgman
0 siblings, 2 replies; 10+ messages in thread
From: fanq @ 2010-09-13 2:22 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
Hello, everybody there:
I am a chinese boy. I use Emacs write something, and find something in
visual-line-mode, that if there is some spaces in a line, Emacs will
wraps this line at the last space, rather than the nearest chinese
character to the window boundary. Maybe it is better making them have
the same priority?
I put an enclosure to show this.
Best,
FanQing
[-- Attachment #2: select.png --]
[-- Type: image/png, Size: 32787 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-13 2:22 Someting with Emacs visual-line-mode fanq
@ 2010-09-13 15:54 ` Tim Visher
2010-09-13 20:58 ` Lennart Borgman
1 sibling, 0 replies; 10+ messages in thread
From: Tim Visher @ 2010-09-13 15:54 UTC (permalink / raw)
To: fanq; +Cc: help-gnu-emacs
On Sun, Sep 12, 2010 at 10:22 PM, fanq <fanqo@126.com> wrote:
> I am a chinese boy. I use Emacs write something, and find something in
> visual-line-mode, that if there is some spaces in a line, Emacs will
> wraps this line at the last space, rather than the nearest chinese
> character to the window boundary. Maybe it is better making them have
> the same priority?
That's actually exactly how visual-line-mode is supposed to behave.
It breaks the line at the nearest space rather than at whatever
character is rubbing up against frame edge. That works very well for
english but perhaps not so well for Chinese? Have you considered
turning visual-line-mode off? It sounds like that might solve the
initial problem you're documenting here.
--
In Christ,
Timmy V.
http://blog.twonegatives.com/
http://five.sentenc.es/ - Spend less time on e-mail
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-13 2:22 Someting with Emacs visual-line-mode fanq
2010-09-13 15:54 ` Tim Visher
@ 2010-09-13 20:58 ` Lennart Borgman
2010-09-14 0:36 ` PJ Weisberg
1 sibling, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2010-09-13 20:58 UTC (permalink / raw)
To: fanq; +Cc: help-gnu-emacs
On Mon, Sep 13, 2010 at 4:22 AM, fanq <fanqo@126.com> wrote:
> Hello, everybody there:
>
> I am a chinese boy. I use Emacs write something, and find something in
> visual-line-mode, that if there is some spaces in a line, Emacs will
> wraps this line at the last space, rather than the nearest chinese
> character to the window boundary. Maybe it is better making them have
> the same priority?
I do not know much about this (since I do not know how Chinise
characters are supposed to be treated), but it looks like a bug to me.
Please try the latest Emacs version (or even build it yourself from
the repository) and send a bug report.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-13 20:58 ` Lennart Borgman
@ 2010-09-14 0:36 ` PJ Weisberg
2010-09-14 0:43 ` Lennart Borgman
0 siblings, 1 reply; 10+ messages in thread
From: PJ Weisberg @ 2010-09-14 0:36 UTC (permalink / raw)
To: help-gnu-emacs
On Mon, Sep 13, 2010 at 1:58 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
>
> I do not know much about this (since I do not know how Chinise
> characters are supposed to be treated), but it looks like a bug to me.
> Please try the latest Emacs version (or even build it yourself from
> the repository) and send a bug report.
That sounds more like a feature request than a bug. Visual line mode
is intended to turn on word-wrap, and the documentation says so. I
think FanQing is just saying that it should be turned off for Chinese
text.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-14 0:36 ` PJ Weisberg
@ 2010-09-14 0:43 ` Lennart Borgman
2010-09-14 0:46 ` suvayu ali
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2010-09-14 0:43 UTC (permalink / raw)
To: PJ Weisberg; +Cc: help-gnu-emacs
On Tue, Sep 14, 2010 at 2:36 AM, PJ Weisberg
<pj@irregularexpressions.net> wrote:
> On Mon, Sep 13, 2010 at 1:58 PM, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>>
>> I do not know much about this (since I do not know how Chinise
>> characters are supposed to be treated), but it looks like a bug to me.
>> Please try the latest Emacs version (or even build it yourself from
>> the repository) and send a bug report.
>
> That sounds more like a feature request than a bug. Visual line mode
> is intended to turn on word-wrap, and the documentation says so. I
> think FanQing is just saying that it should be turned off for Chinese
> text.
I do not think he wanted visual line mode to be turned off. Why do you
say so? FanQing said the line should break, but that it should break
at the last Chinese character before the window boundary..
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-14 0:43 ` Lennart Borgman
@ 2010-09-14 0:46 ` suvayu ali
2010-09-14 7:09 ` PJ Weisberg
0 siblings, 1 reply; 10+ messages in thread
From: suvayu ali @ 2010-09-14 0:46 UTC (permalink / raw)
To: Lennart Borgman; +Cc: help-gnu-emacs
On 13 September 2010 17:43, Lennart Borgman <lennart.borgman@gmail.com> wrote:
> I do not think he wanted visual line mode to be turned off. Why do you
> say so? FanQing said the line should break, but that it should break
> at the last Chinese character before the window boundary..
Isn't that the same behaviour as `truncate-lines' set to `nil'?
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-14 0:46 ` suvayu ali
@ 2010-09-14 7:09 ` PJ Weisberg
2010-09-14 9:16 ` Lennart Borgman
0 siblings, 1 reply; 10+ messages in thread
From: PJ Weisberg @ 2010-09-14 7:09 UTC (permalink / raw)
To: help-gnu-emacs
On Mon, Sep 13, 2010 at 5:46 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
> On 13 September 2010 17:43, Lennart Borgman <lennart.borgman@gmail.com> wrote:
>> I do not think he wanted visual line mode to be turned off. Why do you
>> say so? FanQing said the line should break, but that it should break
>> at the last Chinese character before the window boundary..
>
> Isn't that the same behaviour as `truncate-lines' set to `nil'?
The behavior you get with truncate-lines set to nil, word-wrap set to
nil, and visual-line-mode set to t is what I think he's looking for
with respect to Chinese characters.
What he's really asking for is for Chinese characters to not "stick
together" like English (etc.) characters do when word-wrap is on.
That would take me by surprise if I had embedded a few Chinese
characters into some English text I was writing and Emacs broke the
line between them, because I'm not used to seeing words that are
"breakable" but not normally separated by a space. I don't know what
the best way would be to handle that I'm sure there are different
rules for different languages that I don't even know about, and all
word-wrap does not is look for the last tab or space.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-14 7:09 ` PJ Weisberg
@ 2010-09-14 9:16 ` Lennart Borgman
2010-09-14 10:18 ` suvayu ali
2010-09-15 0:06 ` PJ Weisberg
0 siblings, 2 replies; 10+ messages in thread
From: Lennart Borgman @ 2010-09-14 9:16 UTC (permalink / raw)
To: PJ Weisberg; +Cc: help-gnu-emacs
On Tue, Sep 14, 2010 at 9:09 AM, PJ Weisberg
<pj@irregularexpressions.net> wrote:
> On Mon, Sep 13, 2010 at 5:46 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
>> On 13 September 2010 17:43, Lennart Borgman <lennart.borgman@gmail.com> wrote:
>>> I do not think he wanted visual line mode to be turned off. Why do you
>>> say so? FanQing said the line should break, but that it should break
>>> at the last Chinese character before the window boundary..
>>
>> Isn't that the same behaviour as `truncate-lines' set to `nil'?
>
> The behavior you get with truncate-lines set to nil, word-wrap set to
> nil, and visual-line-mode set to t is what I think he's looking for
> with respect to Chinese characters.
>
> What he's really asking for is for Chinese characters to not "stick
> together" like English (etc.) characters do when word-wrap is on.
> That would take me by surprise if I had embedded a few Chinese
> characters into some English text I was writing and Emacs broke the
> line between them, because I'm not used to seeing words that are
> "breakable" but not normally separated by a space. I don't know what
> the best way would be to handle that I'm sure there are different
> rules for different languages that I don't even know about, and all
> word-wrap does not is look for the last tab or space.
Does not this suggest that Chinese characters should be treated
different than English characters?
Again, please send a bug report.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-14 9:16 ` Lennart Borgman
@ 2010-09-14 10:18 ` suvayu ali
2010-09-15 0:06 ` PJ Weisberg
1 sibling, 0 replies; 10+ messages in thread
From: suvayu ali @ 2010-09-14 10:18 UTC (permalink / raw)
To: Lennart Borgman; +Cc: help-gnu-emacs
On 14 September 2010 02:16, Lennart Borgman <lennart.borgman@gmail.com> wrote:
> On Tue, Sep 14, 2010 at 9:09 AM, PJ Weisberg
> <pj@irregularexpressions.net> wrote:
>> On Mon, Sep 13, 2010 at 5:46 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
>>> On 13 September 2010 17:43, Lennart Borgman <lennart.borgman@gmail.com> wrote:
>>>> I do not think he wanted visual line mode to be turned off. Why do you
>>>> say so? FanQing said the line should break, but that it should break
>>>> at the last Chinese character before the window boundary..
>>>
>>> Isn't that the same behaviour as `truncate-lines' set to `nil'?
>>
>> The behavior you get with truncate-lines set to nil, word-wrap set to
>> nil, and visual-line-mode set to t is what I think he's looking for
>> with respect to Chinese characters.
>>
>> What he's really asking for is for Chinese characters to not "stick
>> together" like English (etc.) characters do when word-wrap is on.
>> That would take me by surprise if I had embedded a few Chinese
>> characters into some English text I was writing and Emacs broke the
>> line between them, because I'm not used to seeing words that are
>> "breakable" but not normally separated by a space. I don't know what
>> the best way would be to handle that I'm sure there are different
>> rules for different languages that I don't even know about, and all
>> word-wrap does not is look for the last tab or space.
>
> Does not this suggest that Chinese characters should be treated
> different than English characters?
>
I suspect that is the case. I don't know any Chinese myself.
> Again, please send a bug report.
>
Lets hope the OP will do that.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Someting with Emacs visual-line-mode
2010-09-14 9:16 ` Lennart Borgman
2010-09-14 10:18 ` suvayu ali
@ 2010-09-15 0:06 ` PJ Weisberg
1 sibling, 0 replies; 10+ messages in thread
From: PJ Weisberg @ 2010-09-15 0:06 UTC (permalink / raw)
To: help-gnu-emacs
On Tue, Sep 14, 2010 at 2:16 AM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> Does not this suggest that Chinese characters should be treated
> different than English characters?
I was actually just getting hung up on the difference between a bug
report and a feature request (since it does exactly what the
documentation says it does), but I guess report-emacs-bug can be used
for either of them.
As a quick work-around, you could add this to your .emacs file:
(add-hook 'visual-line-mode-hook
(lambda()
(if visual-line-mode
(setq word-wrap nil))))
That will turn off word-wrap in visual line mode without losing the
rest of the visual-line stuff. Text will then always wrap at the end
of the window rather than at the last space. I know the exact request
was for it to wrap at the last space or Chinese character, but I'm
making the guess that Chinese text consists mostly of Chinese
characters and this is roughly equivalent. ;-)
I still think it would be wrong to wrap a line between Chinese
characters within English text like in the following example
paragraph.* The writer/readers of that text would see the Chinese
string as a word and expect it to be treated as one. So the really
correct thing to do would depend on whether the *document* was
Chinese, not whether the last character on the line was Chinese.
*"The guy at the tattoo parlor told me that 彝体草 meant 'Courage, Honor,
Strength'. It turns out it's just meaningless nonsense that I'll have
written on my chest for the rest of my life."
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-09-15 0:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-13 2:22 Someting with Emacs visual-line-mode fanq
2010-09-13 15:54 ` Tim Visher
2010-09-13 20:58 ` Lennart Borgman
2010-09-14 0:36 ` PJ Weisberg
2010-09-14 0:43 ` Lennart Borgman
2010-09-14 0:46 ` suvayu ali
2010-09-14 7:09 ` PJ Weisberg
2010-09-14 9:16 ` Lennart Borgman
2010-09-14 10:18 ` suvayu ali
2010-09-15 0:06 ` PJ Weisberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).