Sorry if this has been sent more than once. I was trying to reply from
gnus, and it isn't clear that happened.

The code block in that example is also missing a closing parenthesis.

this post reminded me of this cool feature of source blocks, so I tried
it out. The code block itself does not seem to run, even after fixing
the closing parenthesis.

#+BEGIN_SRC emacs-lisp -r
(save-excursion                  (ref:sc)
  (goto-char (point-min)))       (ref:jump)
#+END_SRC

In line [[(sc)]] we remember the current position.  [[(jump)][Line
(jump)]] jumps to point-min.



I get:

save-excursion: Symbol's function definition is void: ref:sc

unless I put a ; (comment) in front of (ref:sc) and (ref:jump). Then the
block runs, but still does not export correctly.

When I export this to a pdf file, the ref: is removed from the
references, but (sc) and (jump) remain in the code block, and as
Jambunathan noted, the links in the text are not replaced by line numbers.

I hope that helps track down the problem!

my org-version is 8.2.5g, but I also see the problem with 7.9.3f. Let me
know if other information would be helpful. thanks,

Thanks.

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Tue, Jan 28, 2014 at 4:37 AM, Jambunathan K <kjambunat...@gmail.com>wrote:

>
> Nicolas
>
> Code snippets are not getting numbered... Also take a look at
> `org-export-resolve-coderef'.
>
> The below example is from (info "(org) Literal examples")
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN_SRC emacs-lisp -n -r
> (save-excursion                  (ref:sc)
>    (goto-char (point-min))       (ref:jump)
> #+END_SRC
>
> In line [[(sc)]] we remember the current position.  [[(jump)][Line (jump)]]
> jumps to point-min.
> --8<---------------cut here---------------end--------------->8---
>
>
>

Reply via email to