Subject: Re: bug#9286: fill-paragraph destroys URLs

From: Eli Zaretskii <[email-masked]>
Date: Thu, 10 Oct 2019 10:43:07 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Thu, 10 Oct 2019 00:30:54 +0200
> Cc: [email-masked], [email-masked], Kenichi Handa <[email-masked]>,
>  [email-masked]
> 
> > This is because line joining does not include a space if *either*
> > character on each side of the newline has the ?| (line-breakable)
> > category and an entry in fill-nospace-between-words-table.  To get the
> > behavior jidanni wants, we could change it so that *both* the characters
> > must have this property; see attached patch.
> >
> > But I am not sure this is TRT in general.  Handa-san, could you weigh in
> > with an opinion?  Adding a space seems more or less correct to me, but I
> > am no expert.
> 
> This problem is still present in Emacs 27.  This patch, from 2011, was
> never applied.  I think Chong's proposal sounds logical, but like him,
> I'm (ahem) no expert.

Since Kenichi didn't respond, I think we should study what the Unicode
Line-breaking Algorithm has to say about that.  Can you look there for
relevant guidance?  We don't yet implement the complete algorithm, but
some of what they say could nevertheless be used to resolve this
issue.

Thanks.