# org-mode-external-link weird search results in Tex file, “No Match”

Recently start exploring org-mode, find it awesome so far. I use Emacs+Auctex for editing my tex file and tried to create a link that links to my tex file directly to the exact line in my org file. I found some weird results as shown in the screenshot below.

The ridiculous thing is the search doesn't work for \begin{} but work for \end{}. Anybody knows how to fix it? Or is this a bug? Thanks for all the helps.

EDIT1: What I expect is that, when I click on the link, it will direct me to the relevant file at the EXACT line according to the search keyword after the :: after the link. EDIT2 GIF included.

• Can you be a little more descriptive? What do you expect to see in the output file? Also, if you have a question about search, that is probably better posted as a separate question. – zck Feb 26 '16 at 20:19
• @zck The two semicolons after the link is the search key, right? What I expect is that, when I click on the link, it will direct me to the relevant file at the EXACT line. The problem is the link 1 and 3 won't bring me there, "No Match", while link 2 and 4 do. Sorry for my deficiency of description. – Wilson Feb 26 '16 at 22:24

I'm 99% sure this is related to escape characters in regexes. \b in a regexp means "word boundary", not "backslash, then a b". In text.tex, if you delete the first character of the match, so the text is egin{Document}, your search will work.
file:~/target.txt::\\begin{Document}

This will search for a literal backslash. I'm assuming it's working for the \end{Document} search because I don't think there's an escape character \e.
Another cool thing you can do is to use org links that have short names. If you press C-c C-l, org mode will prompt you for a link, and then a description. In the org buffer, it'll only show the description.