From: Katsumi Yamaoka <yamaoka@jpl.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 25685@debbugs.gnu.org
Subject: bug#25685: fill-paragraph vs. \n vs. Chinese / English boundaries
Date: Mon, 13 Feb 2017 09:22:46 +0900 [thread overview]
Message-ID: <b4mshnj2b3d.fsf@jpl.org> (raw)
In-Reply-To: <877f4xy3t0.fsf@jidanni.org>
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
On Sat, 11 Feb 2017 08:22:19 +0800, 積丹尼 Dan Jacobson wrote:
> We proceeded to dig up 些 some Canna edulis Ker 食用美人蕉
> when surprise surprise...
> and do M-h then M-q
> It becomes
> We proceeded to dig up 些 some Canna edulis Ker 食用美人蕉when
> surprise surprise...
> I.e., the "食用美人蕉when" are now stuck 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 592 bytes --]
--- 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))))))
next prev parent reply other threads:[~2017-02-13 0:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 0:22 bug#25685: fill-paragraph vs. \n vs. Chinese / English boundaries 積丹尼 Dan Jacobson
2017-02-13 0:22 ` Katsumi Yamaoka [this message]
2017-02-13 23:13 ` Katsumi Yamaoka
2017-02-15 1:32 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4mshnj2b3d.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=25685@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.