From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thibault Marin Subject: Re: Export tangle filename with source block Date: Tue, 11 Oct 2016 23:39:00 -0500 Message-ID: <87lgxudvvf.fsf@dell-desktop.WORKGROUP> References: <87bn1ewjvd.fsf@dell-desktop.WORKGROUP> <87r37qzl8c.fsf@dell-desktop.WORKGROUP> <87pon6pvc4.fsf@nicolasgoaziou.fr> 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]:39732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buBJw-0000qJ-EG for emacs-orgmode@gnu.org; Wed, 12 Oct 2016 00:39:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buBJq-0007Kr-F4 for emacs-orgmode@gnu.org; Wed, 12 Oct 2016 00:39:11 -0400 Received: from mout.gmx.net ([212.227.17.20]:52572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buBJq-0007JD-5Y for emacs-orgmode@gnu.org; Wed, 12 Oct 2016 00:39:06 -0400 In-reply-to: <87pon6pvc4.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Org Mode Thanks for your reply, it is very helpful. Nicolas Goaziou writes: > They are not. You may want to see how cache is used with info in, e.g., > `org-export-get-footnote-definition'. That looks like what I was trying to achieve (except better), thanks. > The buffer used during export is unlikely to be the same as the original > one. Macros are expanded, comments are removed and Babel code is > possibly evaluated. The only hook run in an exact copy of the original > buffer is `org-export-before-processing-hook'. You can collect anything > here, but INFO doesn't exist yet. OK, then it looks like I may be able to build a list of source block name/tangle filename pairs on pre-processing, store it in a global variable and use it when processing source-blocks. It is probably a little hack-ish but that would be fine for me. On my initial attempt, `org-babel-tangle-collect-blocks' seems to be skipping blocks on one of my tests, but I haven't spent much time on it yet, I'll report back. Thanks again for the help. Best, thibault