Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape square bracket in org mode links?

Tags:

emacs

org-mode

I want to add square bracket in org mode links' description, for example:

[[http://www.example.com][ Array[i] ]]

Is there a way to escape the brackets [ and ] ? Someone mentioned URL-encoding, but it's not compatible. Besides, looking for the URL-encoding of a character is time consuming.

like image 309
Nan Ma Avatar asked Dec 04 '14 01:12

Nan Ma


1 Answers

I suspect that Org doesn't support this.

Org's link structure documentation makes no mention of escaping square brackets in link descriptions.

If you use org-insert-link (bound to C-c C-l by default) and try to use square brackets in your link text, Org converts them to braces:

[[http://www.example.com/][Array{i}]]

You should be able to use a Unicode character that looks like a square bracket inside your link text, but I haven't found a reasonable character to use. The closest I found were SQUARE IMAGE OF () and SQUARE ORIGINAL OF (), which do indeed work:

[[http://www.example.com/][Array⊏i⊐]]
like image 140
Chris Avatar answered Nov 15 '22 07:11

Chris