From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: Nicolas Goaziou <n.goaziou@gmail.com>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [bug] Code snippets are not getting numbered
Date: Tue, 28 Jan 2014 15:22:14 -0500 [thread overview]
Message-ID: <CAJ51ETrOqq_Y52Hxb=htzKHBVevmpR=y7Gqjs5Z6Uiz7Y2HoLA@mail.gmail.com> (raw)
In-Reply-To: <87iot48n1h.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
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 <kjambunathan@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---
>
>
>
[-- Attachment #2: Type: text/html, Size: 2671 bytes --]
next prev parent reply other threads:[~2014-01-28 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 9:37 [bug] Code snippets are not getting numbered Jambunathan K
2014-01-28 20:22 ` John Kitchin [this message]
2014-01-28 21:11 ` Nicolas Goaziou
2014-01-28 21:24 ` Eric Schulte
2014-01-29 8:08 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ51ETrOqq_Y52Hxb=htzKHBVevmpR=y7Gqjs5Z6Uiz7Y2HoLA@mail.gmail.com' \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=kjambunathan@gmail.com \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.