Michael Brand <michael.ch.br...@gmail.com> writes:

> Hi Eric
>
> On Sun, Jun 9, 2013 at 9:18 PM, Eric Schulte <schulte.e...@gmail.com> 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