From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#9286: fill-paragraph destroys URLs Date: Thu, 10 Oct 2019 00:30:54 +0200 Message-ID: <87blupzh41.fsf@gnus.org> References: <87k4ajbpyi.fsf@jidanni.org> <87obzjhn2b.fsf@stupidchicken.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="23040"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34463@debbugs.gnu.org, jidanni@jidanni.org, Kenichi Handa , 9286@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 10 00:31:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIKUE-0005pk-9j for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2019 00:31:14 +0200 Original-Received: from localhost ([::1]:60558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIKUC-0003C1-Ee for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 18:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57794) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIKU3-0003Bs-W0 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 18:31:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIKU2-0003J4-N9 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 18:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIKU2-0003J0-K5 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 18:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iIKU2-0007Oh-F7 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 18:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2019 22:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9286 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 9286-submit@debbugs.gnu.org id=B9286.157066026128394 (code B ref 9286); Wed, 09 Oct 2019 22:31:02 +0000 Original-Received: (at 9286) by debbugs.gnu.org; 9 Oct 2019 22:31:01 +0000 Original-Received: from localhost ([127.0.0.1]:54389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIKU1-0007NY-5o for submit@debbugs.gnu.org; Wed, 09 Oct 2019 18:31:01 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:45930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIKTz-0007Lb-Nx; Wed, 09 Oct 2019 18:31:00 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIKTu-0005TA-KT; Thu, 10 Oct 2019 00:30:57 +0200 In-Reply-To: <87obzjhn2b.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 20 Aug 2011 15:58:52 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168814 Archived-At: Chong Yidong writes: > If I am decoding the jidanni-speak correctly, his complaint is doing M-q > on a buffer containing > > asdf > =E5=9C=8B > > turns the text into > > asdf=E5=9C=8B > > instead of what he wants: > > asdf =E5=9C=8B > > 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. > *** lisp/textmodes/fill.el 2011-07-16 20:05:54 +0000 > --- lisp/textmodes/fill.el 2011-08-20 19:52:41 +0000 > *************** > *** 482,491 **** > (replace-match (get-text-property (match-beginning 0) 'fill-space)) > (let ((prev (char-before (match-beginning 0))) > (next (following-char))) > ! (if (and (or (aref (char-category-set next) ?|) > ! (aref (char-category-set prev) ?|)) > ! (or (aref fill-nospace-between-words-table next) > ! (aref fill-nospace-between-words-table prev))) > (delete-char -1)))))) > > (goto-char from) > --- 482,491 ---- > (replace-match (get-text-property (match-beginning 0) 'fill-space)) > (let ((prev (char-before (match-beginning 0))) > (next (following-char))) > ! (if (and (aref (char-category-set next) ?|) > ! (aref (char-category-set prev) ?|) > ! (aref fill-nospace-between-words-table next) > ! (aref fill-nospace-between-words-table prev)) > (delete-char -1)))))) > > (goto-char from) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no