From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#25685: fill-paragraph vs. \n vs. Chinese / English boundaries Date: Mon, 13 Feb 2017 09:22:46 +0900 Organization: Emacsen advocacy group Message-ID: References: <877f4xy3t0.fsf@jidanni.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1486945392 12964 195.159.176.226 (13 Feb 2017 00:23:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2017 00:23:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin) Cc: 25685@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 13 01:23:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cd4Q6-0002vo-3k for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Feb 2017 01:23:06 +0100 Original-Received: from localhost ([::1]:53903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cd4QB-0007DJ-RL for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Feb 2017 19:23:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cd4Q5-0007DB-Js for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 19:23:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cd4Q2-0001iw-Gj for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 19:23:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39351) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cd4Q2-0001ih-Cz for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 19:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cd4Q2-0005Au-4I for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2017 19:23:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <877f4xy3t0.fsf@jidanni.org> Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Feb 2017 00:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25685 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 25685-submit@debbugs.gnu.org id=B25685.148694537819874 (code B ref 25685); Mon, 13 Feb 2017 00:23:02 +0000 Original-Received: (at 25685) by debbugs.gnu.org; 13 Feb 2017 00:22:58 +0000 Original-Received: from localhost ([127.0.0.1]:37550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cd4Px-0005AU-Oi for submit@debbugs.gnu.org; Sun, 12 Feb 2017 19:22:57 -0500 Original-Received: from mail-hampton.hostforweb.net ([205.234.186.191]:43657 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cd4Pv-0005AI-SI for 25685@debbugs.gnu.org; Sun, 12 Feb 2017 19:22:56 -0500 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cd4Po-001dHo-3U; Sun, 12 Feb 2017 18:22:49 -0600 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:F0tRAN/fI0dTJlC1gSFHv/CVAFI= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: 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: 208.118.235.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:129286 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 11 Feb 2017 08:22:19 +0800, =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobso= n wrote: > We proceeded to dig up =E4=BA=9B some Canna edulis Ker =E9=A3=9F=E7=94=A8= =E7=BE=8E=E4=BA=BA=E8=95=89 > when surprise surprise... > and do M-h then M-q > It becomes > We proceeded to dig up =E4=BA=9B some Canna edulis Ker =E9=A3=9F=E7=94=A8= =E7=BE=8E=E4=BA=BA=E8=95=89when > surprise surprise... > I.e., the "=E9=A3=9F=E7=94=A8=E7=BE=8E=E4=BA=BA=E8=95=89when" are now stu= ck together, making our text > look very unprofessional. Fixing such things one by one manually is my routine, too. But I first tried: * lisp/textmodes/fill.el (fill-delete-newlines): Don't delete leading and trailing space from CJK word. I'm not sure if it is the right solution for every case, though. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- fill.el~ 2017-01-04 22:17:04.000000000 +0000 +++ fill.el 2017-02-12 23:57:42.946118200 +0000 @@ -494,8 +494,8 @@ (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) ?|)) + (if (and (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)))))) --=-=-=--