From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thibault Marin Subject: Problem exporting file with code references Date: Sat, 27 Aug 2016 00:47:17 -0500 Message-ID: <87mvjyoja2.fsf@dell-desktop.WORKGROUP> Reply-To: thibault.marin@gmx.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdWSm-0006Dq-09 for emacs-orgmode@gnu.org; Sat, 27 Aug 2016 01:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdWSh-00079t-Rj for emacs-orgmode@gnu.org; Sat, 27 Aug 2016 01:47:26 -0400 Received: from mout.gmx.net ([212.227.17.21]:63937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdWSh-00079j-HM for emacs-orgmode@gnu.org; Sat, 27 Aug 2016 01:47:23 -0400 Received: from dell-desktop ([99.47.196.62]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lw2dd-1b38M90B7V-017nNi for ; Sat, 27 Aug 2016 07:47:20 +0200 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: "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