From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Problem exporting file with code references Date: Sun, 28 Aug 2016 11:57:14 +0200 Message-ID: <87a8fxxll1.fsf@saiph.selenimh> References: <87mvjyoja2.fsf@dell-desktop.WORKGROUP> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdwq8-0002pg-8I for emacs-orgmode@gnu.org; Sun, 28 Aug 2016 05:57:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdwq4-0003z2-4D for emacs-orgmode@gnu.org; Sun, 28 Aug 2016 05:57:19 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:50019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdwq3-0003yx-U4 for emacs-orgmode@gnu.org; Sun, 28 Aug 2016 05:57:16 -0400 In-Reply-To: <87mvjyoja2.fsf@dell-desktop.WORKGROUP> (Thibault Marin's message of "Sat, 27 Aug 2016 00:47:17 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Thibault Marin Cc: "emacs-orgmode@gnu.org" Hello, Thibault Marin 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