emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem exporting file with code references
@ 2016-08-27  5:47 Thibault Marin
  2016-08-28  9:57 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Thibault Marin @ 2016-08-27  5:47 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org



Hi list,

I am trying to run the last example on the documentation page:
http://orgmode.org/manual/Literal-examples.html and I am running into a
problem.  The following is the full org file I am trying to export:

---
#+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.
---

When trying to export (I tried html or latex), I get the following error
message: 'user-error: Unable to resolve link: "sc"'.

Trying to investigate, it appears that the `org-babel--normalize-body'
function (ob-core.el) removes the references "(ref:sc)" and "(ref:jump)"
from the code block prior to execution.  This happens during the call to
`org-babel-exp-process-buffer' when `org-export-babel-evaluate' is
non-nil (in ox.el).  From that point, the source block content does not
contain the "(ref:sc)" and "(ref:jump)" text.  Consequently, when
reaching the `org-export-resolve-coderef' function, the link is not
found in the code and the error is returned.

I get this failure with version:
Org-mode version 8.3.5 (release_8.3.5-1079-g61dd51.dirty @
~/org_git/org-mode/lisp/)

For reference, the same file get exported without issue when using an
older version:
Org-mode version 8.3.5 (8.3.5-elpaplus @
~/.emacs.d/elpa/org-plus-contrib-20160815/)

Am I missing something here? Is this a bug?

Any help would be greatly appreciated.

Thanks,
thibault

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem exporting file with code references
  2016-08-27  5:47 Problem exporting file with code references Thibault Marin
@ 2016-08-28  9:57 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-08-28  9:57 UTC (permalink / raw)
  To: Thibault Marin; +Cc: emacs-orgmode@gnu.org

Hello,

Thibault Marin <thibault.marin@gmx.com> writes:

> I am trying to run the last example on the documentation page:
> http://orgmode.org/manual/Literal-examples.html and I am running into a
> problem.  The following is the full org file I am trying to export:
>
> ---
> #+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.
> ---
>
> When trying to export (I tried html or latex), I get the following error
> message: 'user-error: Unable to resolve link: "sc"'.
>
> Trying to investigate, it appears that the `org-babel--normalize-body'
> function (ob-core.el) removes the references "(ref:sc)" and "(ref:jump)"
> from the code block prior to execution.  This happens during the call to
> `org-babel-exp-process-buffer' when `org-export-babel-evaluate' is
> non-nil (in ox.el).  From that point, the source block content does not
> contain the "(ref:sc)" and "(ref:jump)" text.  Consequently, when
> reaching the `org-export-resolve-coderef' function, the link is not
> found in the code and the error is returned.

This is now fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-28  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-27  5:47 Problem exporting file with code references Thibault Marin
2016-08-28  9:57 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).