From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erwin Panen Subject: Re: file link format question - How to format link when square brackets [ ] are already in filename? Date: Tue, 02 Feb 2010 21:46:58 +0100 Message-ID: <4B688F42.2040700@fastmail.fm> References: <4B680377.30601@fastmail.fm> <877hqvfue9.wl%maus.david@gmail.com> <4B68805F.9000605@fastmail.fm> <87wryve5ky.wl%maus.david@gmail.com> Reply-To: erwinpanen@fastmail.fm Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcPeM-0000fN-FD for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 15:47:06 -0500 Received: from [199.232.76.173] (port=46387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcPeM-0000ee-0h for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 15:47:06 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcPeI-0006g6-On for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 15:47:05 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:52108) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcPeI-0006fg-5c for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 15:47:02 -0500 In-Reply-To: <87wryve5ky.wl%maus.david@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: emacs-orgmode@gnu.org David, thanks for clarifying :-) I think I get it now. Your example helps! What I did (wrongly) was to exchange the outer brackets with %5B and %5D Instead I should have exchanged the brackets enclosing 32 I get an error of the file not found now, but at least Emacs/org does=20 fold the link now and only leaves the description! I guess I'll figure out the missing file problem. Thanks very much for helping out! Erwin David Maus wrote: > Hi Erwin, >=20 > At Tue, 02 Feb 2010 20:43:27 +0100, > Erwin Panen wrote: >> Hi David, >> >> Thanks for replying; >> I don't understand what you mean. I was not aware off url-encoding, bu= t found help here: http://www.eskimo.com/~bloo/ >> indexdot/html/topics/urlencoding.htm >> So far so good. >> The way I interpret this is that I can 'replace' [square brackets] in = orgmode with %5Bsquare brackets%5D >=20 > That's exactly what I meant. The behaviour you notice when /not/ > encoding the square brackets is absolutely correct because of the way > Orgmode works: If you display a file in org-mode, the Orgmode > functions interpret the file's content and change the way certain > portions of the file look ("folding" of the link, i.e. only display > the description) and what you can do on this regions (i.e. open the > link). >=20 > So there is for instance a pattern that "tells" Orgmode that something > is a link: [[]] is recognized > as a link with a target (first set of characters) and a description > (second set of characters). If there are literal square brackets in > either the description or the target, Orgmode simply does not > recognize the string as a link. >=20 > The same principle (interpreting strings/a sequence of characters) > causes Orgmode to recognize the [32] as a footnote. Why? Because there > is a definition that says the "a number between two square brakets is > a footnote". >=20 >> However when I try this, org does not 'convert' to a link...? What >> am I missing? >=20 > Strange. What Emacs and Orgmode version do you use?[1] I use=20 >=20 > "GNU Emacs 23.1.92.1 (i486-pc-linux-gnu, GTK+ Version 2.18.6) of > 2010-01-31 on elegiac, modified by Debian" >=20 > with >=20 > "Org-mode version 6.34trans (release_6.34c.65.g45c58)" >=20 > For me encoding the square brackets in the link name with %5B and %5D > works. That is: Emacs/Orgmode "collapses" the link and only displays > the description part. >=20 > ,---- > | [[\\Dcerouter\public\videos\STORY_Station (sdb1)-CORE %5B32%5D\Les Ri= vi=C3=A8res Pourpres 720x304\The Crimson Rivers.mkv][The Crimson Rivers.m= kv]] > `---- >=20 > gives: >=20 > ,---- > | The Crimson Rivers.mkv > `---- >=20 > Regards, > -- David >=20 >=20 > [1] To find out your version simply execute "org-version" (M-x > org-version RET) and "emacs-version" (M-x emacs-version RET) and > switch to the buffer called "*Messages*" to see the version strings of > Emacs and Orgmode. >=20 >=20 > -----------------------------------------------------------------------= - >=20 > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode