unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25099: fill-paragraph racial discrimination space zapping
@ 2016-12-02 23:37 積丹尼 Dan Jacobson
  2016-12-03 10:43 ` Alan Third
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2016-12-02 23:37 UTC (permalink / raw)
  To: 25099

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"





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-02 23:37 bug#25099: fill-paragraph racial discrimination space zapping 積丹尼 Dan Jacobson
@ 2016-12-03 10:43 ` Alan Third
  2016-12-03 12:59 ` 積丹尼 Dan Jacobson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Alan Third @ 2016-12-03 10:43 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 25099

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-02 23:37 bug#25099: fill-paragraph racial discrimination space zapping 積丹尼 Dan Jacobson
  2016-12-03 10:43 ` Alan Third
@ 2016-12-03 12:59 ` 積丹尼 Dan Jacobson
  2016-12-03 13:17   ` Alan Third
  2016-12-03 13:45 ` 積丹尼 Dan Jacobson
  2016-12-04 21:34 ` Hong Xu
  3 siblings, 1 reply; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2016-12-03 12:59 UTC (permalink / raw)
  To: Alan Third; +Cc: 25099

It's not that simple.
http://unicode.org/reports/tr14/
https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap
Anyway, looksbad.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-03 12:59 ` 積丹尼 Dan Jacobson
@ 2016-12-03 13:17   ` Alan Third
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Third @ 2016-12-03 13:17 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 25099

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-02 23:37 bug#25099: fill-paragraph racial discrimination space zapping 積丹尼 Dan Jacobson
  2016-12-03 10:43 ` Alan Third
  2016-12-03 12:59 ` 積丹尼 Dan Jacobson
@ 2016-12-03 13:45 ` 積丹尼 Dan Jacobson
  2016-12-03 14:21   ` Alan Third
  2016-12-04 21:34 ` Hong Xu
  3 siblings, 1 reply; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2016-12-03 13:45 UTC (permalink / raw)
  To: Alan Third; +Cc: 25099

Well isn't there something wrong with

making
this

look like

makingthis

instead of

making this

or

making this





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-03 13:45 ` 積丹尼 Dan Jacobson
@ 2016-12-03 14:21   ` Alan Third
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Third @ 2016-12-03 14:21 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 25099

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-02 23:37 bug#25099: fill-paragraph racial discrimination space zapping 積丹尼 Dan Jacobson
                   ` (2 preceding siblings ...)
  2016-12-03 13:45 ` 積丹尼 Dan Jacobson
@ 2016-12-04 21:34 ` Hong Xu
  2017-01-19  3:47   ` npostavs
  3 siblings, 1 reply; 9+ messages in thread
From: Hong Xu @ 2016-12-04 21:34 UTC (permalink / raw)
  To: 25099

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]


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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2016-12-04 21:34 ` Hong Xu
@ 2017-01-19  3:47   ` npostavs
  2017-01-19  4:20     ` Hong Xu
  0 siblings, 1 reply; 9+ messages in thread
From: npostavs @ 2017-01-19  3:47 UTC (permalink / raw)
  To: Hong Xu; +Cc: 25099

retitle 25099 fill-paragraph doesn't put spaces between joined lines of Chinese characters
tags 25099 notabug
quit

Hong Xu <hong@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).





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#25099: fill-paragraph racial discrimination space zapping
  2017-01-19  3:47   ` npostavs
@ 2017-01-19  4:20     ` Hong Xu
  0 siblings, 0 replies; 9+ messages in thread
From: Hong Xu @ 2017-01-19  4:20 UTC (permalink / raw)
  To: npostavs; +Cc: 25099


[-- Attachment #1.1: Type: text/plain, Size: 890 bytes --]

On 01/18/2017 07:47 PM, npostavs@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@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.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-01-19  4:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02 23:37 bug#25099: fill-paragraph racial discrimination space zapping 積丹尼 Dan Jacobson
2016-12-03 10:43 ` Alan Third
2016-12-03 12:59 ` 積丹尼 Dan Jacobson
2016-12-03 13:17   ` Alan Third
2016-12-03 13:45 ` 積丹尼 Dan Jacobson
2016-12-03 14:21   ` Alan Third
2016-12-04 21:34 ` Hong Xu
2017-01-19  3:47   ` npostavs
2017-01-19  4:20     ` Hong Xu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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