emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Feng Shu" <tumashu@163.com>
To: orgmode-devel <emacs-orgmode@gnu.org>
Subject: [PATCH] Let radio target works well with Chinese
Date: Sun, 24 Feb 2019 18:08:07 +0800	[thread overview]
Message-ID: <87ftsdjy7s.fsf@163.com> (raw)

[-- Attachment #1: 0001-Let-radio-target-works-well-with-Chinese.patch --]
[-- Type: text/x-patch, Size: 1170 bytes --]

From bbf085c61f8b7e9b80077b401cd275b420b4ddca Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Sun, 24 Feb 2019 17:52:51 +0800
Subject: [PATCH] Let radio target works well with Chinese
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/org.el (org-update-radio-target-regexp): Let radio target works well with Chinese.

There is no need to force split words with the help
of space for Chinese, this change let the below
example works well.

<<<天空>>>

我爱天空和大地
    ^^^^
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 9f33c9e60..ea68aacfc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6052,8 +6052,8 @@ by a #."
 Also refresh fontification if needed."
   (interactive)
   (let ((old-regexp org-target-link-regexp)
-	(before-re "\\(?:^\\|[^[:alnum:]]\\)\\(")
-	(after-re "\\)\\(?:$\\|[^[:alnum:]]\\)")
+	(before-re "\\(?:^\\|[^[:alnum:]]\\|\\cc\\)\\(")
+	(after-re "\\)\\(?:$\\|[^[:alnum:]]\\|\\cc\\)")
 	(targets
 	 (org-with-wide-buffer
 	  (goto-char (point-min))
-- 
2.20.1


[-- Attachment #2: Type: text/plain, Size: 6 bytes --]



-- 

             reply	other threads:[~2019-02-24 10:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-24 10:08 Feng Shu [this message]
2019-02-25 12:31 ` [PATCH] Let radio target works well with Chinese Nicolas Goaziou
2019-02-25 14:08   ` Emilio Francesquini
2019-02-25 19:50     ` Eric Abrahamsen
2019-02-26  3:02       ` tumashu
2019-02-28 10:39   ` tumashu
2019-02-28 13:52     ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftsdjy7s.fsf@163.com \
    --to=tumashu@163.com \
    --cc=emacs-orgmode@gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).