emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] link abbreviation with multiple params, e. g. for geo locations


From: Eric Schulte
Subject: Re: [O] link abbreviation with multiple params, e. g. for geo locations
Date: Tue, 11 Jun 2013 07:12:01 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Brand <address@hidden> writes:

> Hi Eric
>
> On Sun, Jun 9, 2013 at 9:18 PM, Eric Schulte <address@hidden> wrote:
>> Export buffers are sometimes modified or narrowed during the export
>> process, so I wouldn't depend too much on the absolute values of markers
>> generated during export.  As long as the heading in which the marker
>> lives seems to be correct I'd count it as a success.
>
> Ok.
>
> Out of curiosity I also tried to assign a Lisp marker with :var
>
> #+HEADER: :var marker-var=(identity org-babel-current-src-block-location)
>
> which leads to
>
> executing Emacs-Lisp code block (func)...
> (marker-var (quote #<marker at 458 in marker_offset.org>))
> eval: Invalid read syntax: "#"
>

You'll get this if you do the following.

  ;; -*- emacs-lisp -*-
  (read-from-string (format "%s" (point-marker)))

This is because unlike most lisp objects, point markers can not be read
in the same syntax they print as.  Babel only supports passing strings,
numbers, and lists of strings and numbers as variables between code
blocks.  If you convert the point-marker to a point (integer) then it
will flow between blocks.

>
> Is such a Lisp marker supposed to work across a :var assignment? For
> me it does not matter because either the variable
> org-babel-current-src-block-location is better evaluated within the
> source block or in the header I do not expect the value to be of much
> use for source blocks other than Lisp. I just let you know in case you
> wanted the assignment to work with other #-constructs or there was a
> connection with the recent changes that temporarily required :shebang
> quoting.
>
> Michael

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

[Prev in Thread] Current Thread [Next in Thread]