From: Chunyang Xu <mail@xuchunyang.me>
To: Kaushal Modi <kaushal.modi@gmail.com>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org, 林镇国 <mistkafka@gmail.com>
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 [thread overview]
Message-ID: <m2bmqgujon.fsf@xuchunyang.me> (raw)
In-Reply-To: <CAFyQvY32gg33eOB973RwaKUFPjGSK5TRLBCoGZBTganJmx75dw@mail.gmail.com>
Kaushal Modi <kaushal.modi@gmail.com> writes:
> On Wed, May 24, 2017 at 9:50 AM Chunyang Xu <mail@xuchunyang.me> wrote:
>
>>
>> Nicolas Goaziou writes:
>>
>> > Hello,
>> >
>> > 林镇国 <mistkafka@gmail.com> writes:
>> >
>> >> When I insert a link to my note, such as“这是一个[[link][链接]]啦~”,
>> >> the text after the link, "啦~", will be formatting as link style.
>> >
>> > FWIW, I cannot reproduce it, i.e., only "链接" appears with 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 will
> ;; 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.
>
> --
>
> Kaushal Modi
next prev parent reply other threads:[~2017-05-26 8:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 6:03 Bug: link formating problem [9.0.5 (9.0.5-elpaplus @ /Users/mistkafka/.emacs.d/elpa/org-plus-contrib-20170210/)] 林镇国
2017-05-23 6:37 ` Nicolas Goaziou
2017-05-24 13:48 ` Chunyang Xu
2017-05-24 13:56 ` Kaushal Modi
2017-05-26 8:05 ` Chunyang Xu [this message]
2017-05-26 8:09 ` Chunyang Xu
2017-05-26 10:03 ` Nicolas Goaziou
2017-05-27 16:13 ` Kaushal Modi
2017-05-27 19:12 ` Chunyang Xu
2017-05-27 19:53 ` Achim Gratz
2017-05-28 4:21 ` Chunyang Xu
2017-05-28 7:41 ` 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=m2bmqgujon.fsf@xuchunyang.me \
--to=mail@xuchunyang.me \
--cc=emacs-orgmode@gnu.org \
--cc=kaushal.modi@gmail.com \
--cc=mail@nicolasgoaziou.fr \
--cc=mistkafka@gmail.com \
/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).