From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: How to escape "[" and "]" characters in org-mode links Date: Wed, 29 Jul 2015 11:55:19 -0400 Message-ID: <871tfrdkm0.fsf@kyleam.com> References: <55B62C72.1060404@laposte.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKThX-0002j8-9i for emacs-orgmode@gnu.org; Wed, 29 Jul 2015 11:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKThT-0002xC-6Q for emacs-orgmode@gnu.org; Wed, 29 Jul 2015 11:55:27 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:32912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKThT-0002wE-2d for emacs-orgmode@gnu.org; Wed, 29 Jul 2015 11:55:23 -0400 Received: by qged69 with SMTP id d69so6474827qge.0 for ; Wed, 29 Jul 2015 08:55:21 -0700 (PDT) In-Reply-To: (Ivanov Dmitry's message of "Wed, 29 Jul 2015 15:02:23 +0300") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ivanov Dmitry Cc: Xiha , emacs-orgmode@gnu.org Ivanov Dmitry 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