From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chunyang Xu Subject: Re: Bug: link formating problem [9.0.5 (9.0.5-elpaplus @ /Users/mistkafka/.emacs.d/elpa/org-plus-contrib-20170210/)] Date: Fri, 26 May 2017 16:05:44 +0800 Message-ID: References: <87wp98dqoq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEAFy-0000vJ-EK for emacs-orgmode@gnu.org; Fri, 26 May 2017 04:05:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEAFu-0003nK-Az for emacs-orgmode@gnu.org; Fri, 26 May 2017 04:05:58 -0400 Received: from smtpproxy19.qq.com ([184.105.206.84]:42684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dEAFu-0003mh-1o for emacs-orgmode@gnu.org; Fri, 26 May 2017 04:05:54 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi , Nicolas Goaziou Cc: emacs-orgmode@gnu.org, =?utf-8?B?5p6X6ZWH5Zu9?= Kaushal Modi writes: > On Wed, May 24, 2017 at 9:50 AM Chunyang Xu wrote: > >> >> Nicolas Goaziou writes: >> >> > Hello, >> > >> > =E6=9E=97=E9=95=87=E5=9B=BD writes: >> > >> >> When I insert a link to my note, such as=E2=80=9C=E8=BF=99=E6=98=AF= =E4=B8=80=E4=B8=AA[[link][=E9=93=BE=E6=8E=A5]]=E5=95=A6~=E2=80=9D=EF=BC=8C >> >> the text after the link, "=E5=95=A6~", will be formatting as link sty= le. >> > >> > FWIW, I cannot reproduce it, i.e., only "=E9=93=BE=E6=8E=A5" appears w= ith a link face. >> >> I can reproduce if "link" is a real link and "description" doesn't >> contain white space, for example, >> >> [[http://example.com/][Example]]blah >> ^^^^ >> Also under the org-link face >> >> It looks like `org-plain-link-re' doesn't think a link is end unless >> a punctuation character is found: >> >> org-plain-link-re >> (concat >> "\\<" types-re ":" >> "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] >> \t\n]\\|/\\)\\)\\)") >> ^^^^^^^^^^^^^^^^^ >> >> It is a reasonable assumption for English, but not for Chinese. >> > > I actually stumbled across this few days back, and when using English > language :) > > Here's a solution that might work for you too (and my notes on why I set > this): > > ;; The default value of `org-highlight-links' contains `plain' too. > ;; - "plain" links are links in normal text, no whitespace, like > http://foo.com. > ;; Here's why I remove "plain" from this list: > ;; - If I have two bracketed links next to each-other in org-mode (like > below), > ;; [[http://google.com][1]],[[http://orgmode.org][2]] > ;; - and, if `plain' is in the `org-highlight-links' list, > ;; the "," in there will also be highlighted as a link. So it would look > ;; as if the "1,2" string pointed to a single link! > ;; But without `plain' as part of this list, the "1" and "2" strings w= ill > ;; look like separate links (as should be the case), as the "," will not = be > ;; highlighted as a link. > (setq org-highlight-links (delete 'plain org-highlight-links)) Oh, I didn't know the user option, I just added it to my init file. Thanks. > > --=20 > > Kaushal Modi