GNU bug report logs - #25099
fill-paragraph doesn't put spaces between joined lines of Chinese characters

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 3 Dec 2016 01:07:02 UTC

Severity: minor

Tags: notabug

Merged with 25685

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25099 in the body.
You can then email your comments to 25099 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sat, 03 Dec 2016 01:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Dec 2016 01:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: fill-paragraph racial discrimination space zapping
Date: Sat, 03 Dec 2016 07:37:28 +0800
No fair!
M-q (translated from <escape> q) runs the command fill-paragraph
which turns

a
b
c
d

a
b
c
d

into

a b c d

abcd

that's right, it rips the spaces that should be put in the latter out!

You might say turning

一位共同朋友
兩位朋友是成員
三個朋友在這個社團
四個社團的成員

into

一位共同朋友兩位朋友是成員三個朋友在這個社團四個社團的成員

makes just as much sense as before, but I say it throws away valuable
punctuation (end of line, which many use instead of ,,。, etc. At least
leave a space. You do if one occurs in the middle of the line, so don't
just assume somebody put those newlines there for nothing...)

emacs-version "25.1.1"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sat, 03 Dec 2016 10:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Sat, 3 Dec 2016 10:43:44 +0000
On Sat, Dec 03, 2016 at 07:37:28AM +0800, 積丹尼 Dan Jacobson wrote:
> You might say turning
> 
> 一位共同朋友
> 兩位朋友是成員
> 三個朋友在這個社團
> 四個社團的成員
> 
> into
> 
> 一位共同朋友兩位朋友是成員三個朋友在這個社團四個社團的成員
> 
> makes just as much sense as before, but I say it throws away valuable
> punctuation (end of line, which many use instead of ,,。, etc. At least
> leave a space. You do if one occurs in the middle of the line, so don't
> just assume somebody put those newlines there for nothing...)

Hi, I’m not sure I understand. fill-paragraph is supposed to remove
the newlines. What, exactly, would you expect to see as output from
the above example?
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sat, 03 Dec 2016 13:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Sat, 03 Dec 2016 20:59:46 +0800
It's not that simple.
http://unicode.org/reports/tr14/
https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap
Anyway, looksbad.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sat, 03 Dec 2016 13:18:01 GMT) Full text and rfc822 format available.

Message #14 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Sat, 3 Dec 2016 13:17:39 +0000
On Sat, Dec 03, 2016 at 08:59:46PM +0800, 積丹尼 Dan Jacobson wrote:
> It's not that simple.

I asked for an example of what you’d expect to see and you’re telling
me you can’t provide one?

> http://unicode.org/reports/tr14/
> https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap

What am I looking for in these links?

-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sat, 03 Dec 2016 13:46:01 GMT) Full text and rfc822 format available.

Message #17 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Sat, 03 Dec 2016 21:45:54 +0800
Well isn't there something wrong with

making
this

look like

makingthis

instead of

making this

or

making this




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sat, 03 Dec 2016 14:22:01 GMT) Full text and rfc822 format available.

Message #20 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Sat, 3 Dec 2016 14:21:18 +0000
On Sat, Dec 03, 2016 at 09:45:54PM +0800, 積丹尼 Dan Jacobson wrote:
> Well isn't there something wrong with
> 
> making
> this
> 
> look like
> 
> makingthis
> 
> instead of
> 
> making this
> 
> or
> 
> making this

Ah yes, I see, fill-paragraph failing to put spaces in when the lines
are concatenated.

As far as I can tell (just reading on wikipedia, so I won’t pretend I
really know what I’m talking about) that would be the expected
behaviour in Chinese, but perhaps there should be some way of turning
it off? I can’t see one in there just now.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Sun, 04 Dec 2016 21:35:01 GMT) Full text and rfc822 format available.

Message #23 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: Hong Xu <hong <at> topbug.net>
To: 25099 <at> debbugs.gnu.org
Subject: Re: fill-paragraph racial discrimination space zapping
Date: Sun, 04 Dec 2016 13:34:39 -0800
[Message part 1 (text/plain, inline)]
Hi Dan, I think there is actually no issue in your example.  The doc of
fill-paragraph says:

   Fill paragraph at or after point.

That means, the text under point is assumed to be a paragraph. In your
Chinese example, it is actually not a paragraph -- and the effect of
fill-paragraph is exactly correct if treating the text as a paragraph.
The English example just happened to be correct -- the effect would be
the same for paragraphs.

To solve your problem, I suggest creating another function for the
purpose, instead of "fixing" fill-paragraph.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Thu, 19 Jan 2017 03:47:02 GMT) Full text and rfc822 format available.

Message #26 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Hong Xu <hong <at> topbug.net>
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Wed, 18 Jan 2017 22:47:51 -0500
retitle 25099 fill-paragraph doesn't put spaces between joined lines of Chinese characters
tags 25099 notabug
quit

Hong Xu <hong <at> topbug.net> writes:

> Hi Dan, I think there is actually no issue in your example.  The doc of
> fill-paragraph says:
>
>    Fill paragraph at or after point.
>
> That means, the text under point is assumed to be a paragraph. In your
> Chinese example, it is actually not a paragraph -- and the effect of
> fill-paragraph is exactly correct if treating the text as a paragraph.
> The English example just happened to be correct -- the effect would be
> the same for paragraphs.

Not a bug then?  (I don't know Chinese, so I can't determine this
myself, therefore just marking it without closing for now).

PS Dan, please don't use such charged language (like "racial
discrimination") in bug reports, it's kind of irritating (especially
since it's not very descriptive in this case).




Changed bug title to 'fill-paragraph doesn't put spaces between joined lines of Chinese characters' from 'fill-paragraph racial discrimination space zapping' Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 19 Jan 2017 03:47:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 19 Jan 2017 03:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25099; Package emacs. (Thu, 19 Jan 2017 04:22:02 GMT) Full text and rfc822 format available.

Message #33 received at 25099 <at> debbugs.gnu.org (full text, mbox):

From: Hong Xu <hong <at> topbug.net>
To: npostavs <at> users.sourceforge.net
Cc: 25099 <at> debbugs.gnu.org
Subject: Re: bug#25099: fill-paragraph racial discrimination space zapping
Date: Wed, 18 Jan 2017 20:20:57 -0800
[Message part 1 (text/plain, inline)]
On 01/18/2017 07:47 PM, npostavs <at> users.sourceforge.net wrote:
> retitle 25099 fill-paragraph doesn't put spaces between joined lines of Chinese characters
> tags 25099 notabug
> quit
> 
> Hong Xu <hong <at> topbug.net> writes:
> 
>> Hi Dan, I think there is actually no issue in your example.  The doc of
>> fill-paragraph says:
>>
>>    Fill paragraph at or after point.
>>
>> That means, the text under point is assumed to be a paragraph. In your
>> Chinese example, it is actually not a paragraph -- and the effect of
>> fill-paragraph is exactly correct if treating the text as a paragraph.
>> The English example just happened to be correct -- the effect would be
>> the same for paragraphs.
> 
> Not a bug then?  (I don't know Chinese, so I can't determine this
> myself, therefore just marking it without closing for now).

Correct, I don't think this is a bug.


[signature.asc (application/pgp-signature, attachment)]

Merged 25099 25685. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 11 Feb 2017 02:39:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 25685 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Katsumi Yamaoka <yamaoka <at> jpl.org> to control <at> debbugs.gnu.org. (Wed, 15 Feb 2017 22:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Mar 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.