From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [babel] escaping of links when result from source code block? Date: Fri, 22 Jul 2011 08:34:28 +0200 Message-ID: References: <87mxg7zglr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00163683181a52022904a8a2a88c Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk9Jg-0006rM-C5 for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 02:34:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qk9Je-0003wY-Uu for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 02:34:32 -0400 Received: from mail-qy0-f169.google.com ([209.85.216.169]:46724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk9Je-0003wU-Ob for emacs-orgmode@gnu.org; Fri, 22 Jul 2011 02:34:30 -0400 Received: by qyk32 with SMTP id 32so4551678qyk.0 for ; Thu, 21 Jul 2011 23:34:30 -0700 (PDT) In-Reply-To: <87mxg7zglr.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode --00163683181a52022904a8a2a88c Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 21, 2011 at 7:28 PM, Eric Schulte wrote: > Hi Rainer, > Hi Eric, > The leading "[" makes the string result look like a list to Babel, so it > is passed to the `read' function which then escapes the periods in the > file name. You can inhibit this interpretation of the string by > explicitly informing the code block that you will be returning a string > with the ":results scalar" header argument. You may also want to look > at the ":results file" header argument. > That explains. I an using it to return links to several graphs created in R, so I think the scalar option would be a good solution. Thanks a lot, Rainer > > Best -- Eric > > Rainer M Krug writes: > > > Hi > > > > when evaluating the code blocks below, I would expect [[file:./cv.cls]] > , > > but I get [[file:./cv\.cls]], i.e. the "." is escaped and does not work. > > > > When not using [[]], the "." is not escaped - is this a bug, or how can I > > circumvent the esaping? > > > > Cheers, > > > > Rainer > > > > #+begin_src R :results org > > paste("[[file:./cv.cls]]") > > #+end_src > > > > #+results: > > #+BEGIN_ORG > > [[file:\./cv\.cls]] > > #+END_ORG > > > > #+begin_src sh :results org > > echo "[[file:./cv.cls]]" > > #+end_src > > > > #+results: > > #+BEGIN_ORG > > [[file:\./cv\.cls]] > > #+END_ORG > > > > #+begin_src R :results org > > paste("file:./cv.cls") > > #+end_src > > > > #+results: > > #+BEGIN_ORG > > file:./cv.cls > > #+END_ORG > > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --00163683181a52022904a8a2a88c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Jul 21, 2011 at 7:28 PM, Eric Sc= hulte <schul= te.eric@gmail.com> wrote:
Hi Rainer,

Hi Eric,
=A0
=
The leading "[" makes the string result look like a list to Babel= , so it
is passed to the `read' function which then escapes the periods in the<= br> file name. =A0You can inhibit this interpretation of the string by
explicitly informing the code block that you will be returning a string
with the ":results scalar" header argument. =A0You may also want = to look
at the ":results file" header argument.

=
That explains. I an using it to return links to several graphs c= reated in R, so I think the scalar option would be a good solution.

Thanks a lot,

Rainer

=A0=A0

Best -- Eric
Eric Schulte
http://cs.unm.ed= u/~eschulte/



--
Rainer M. Krug, = PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phy= s. (Germany)

Centre of Excellence for Invasion Biology
Stellenbos= ch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9 53 10 27 44
Cell: =A0 = =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 =A0 =A0 +33 - (0)9 58 10 27 = 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44

email: =A0 =A0 = =A0Rainer@krugs.de=

Skype: =A0 =A0 =A0RMkrug

--00163683181a52022904a8a2a88c--