Re: [O] How to escape [ and ] characters in org-mode links

2015-08-02 Thread Ivanov Dmitry
 It works here on a recent Org.

Thank you. I have a little outdated version. It started to work after
I used the escaped percent as Kyle Meyer suggested.



Re: [O] How to escape [ and ] characters in org-mode links

2015-08-02 Thread Nicolas Goaziou
Hello,

Ivanov Dmitry usr...@gmail.com writes:

 Unfortunately URL encoding the [ and ] doesn't work for me. Try to
 reproduce it. Create 2 files:

 file.txt. Content:
 
 $form['text1']

 $form['text2']
 
 file.org. Content:
 
 [[./file.txt::$form%5B'text2'%5D][text2]]
 

 When I click the link, it says No match.

It works here on a recent Org.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to escape [ and ] characters in org-mode links

2015-08-02 Thread Kyle Meyer
Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 Ivanov Dmitry usr...@gmail.com writes:

 Unfortunately URL encoding the [ and ] doesn't work for me. Try to
 reproduce it. Create 2 files:

 file.txt. Content:
 
 $form['text1']

 $form['text2']
 
 file.org. Content:
 
 [[./file.txt::$form%5B'text2'%5D][text2]]
 

 When I click the link, it says No match.

 It works here on a recent Org.

Hmm, that's weird.  I'm still seeing this with emacs -Q using
release_8.3beta-1312-g8094d0.

--
Kyle



Re: [O] How to escape [ and ] characters in org-mode links

2015-08-02 Thread Nicolas Goaziou
Hello,

Kyle Meyer k...@kyleam.com writes:

 Hmm, that's weird.  I'm still seeing this with emacs -Q using
 release_8.3beta-1312-g8094d0.

Indeed, my bad. This should be fixed in cfe5bc9.

However, the current escaping mechanism for links in Org is not really
satisfactory. In the long run, we will need to change it.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to escape [ and ] characters in org-mode links

2015-07-29 Thread Kyle Meyer
Ivanov Dmitry usr...@gmail.com wrote:
 Hi, Xiha

 Unfortunately URL encoding the [ and ] doesn't work for me. Try to
 reproduce it. Create 2 files:

 file.txt. Content:
 
 $form['text1']

 $form['text2']
 
 file.org. Content:
 
 [[./file.txt::$form%5B'text2'%5D][text2]]
 

 When I click the link, it says No match.

While the search string is escaped elsewhere in org-link-search using
regexp-quote, it is treated as a regular expression for normal text
search.  Try escaping with \:

[[./file.txt::$form\%5B'text2'\%5D]]

--
Kyle



Re: [O] How to escape [ and ] characters in org-mode links

2015-07-29 Thread Ivanov Dmitry
Hi, Xiha

Unfortunately URL encoding the [ and ] doesn't work for me. Try to
reproduce it. Create 2 files:

file.txt. Content:

$form['text1']

$form['text2']

file.org. Content:

[[./file.txt::$form%5B'text2'%5D][text2]]


When I click the link, it says No match.



Re: [O] How to escape [ and ] characters in org-mode links

2015-07-27 Thread Xiha

Hi Dmitry,


org-mode has the following format for links:

[[file-name::text-to-search][link text]]

What should I do, if text-to-search contains ']' symbol? Like this:

$form['input']


Not sure it helps in your case, but this

   * Heading containing [brackets]

   * Other heading

   Here is a link to [[Heading containing *%5B*brackets*%5D*][that
   first heading]].

works for me.


[O] How to escape [ and ] characters in org-mode links

2015-07-25 Thread Ivanov Dmitry
org-mode has the following format for links:

[[file-name::text-to-search][link text]]

What should I do, if text-to-search contains ']' symbol? Like this:

$form['input']