From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: tangle on export Date: Thu, 24 Sep 2015 14:43:43 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf6ob-0007zf-RT for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 09:44:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf6oX-00029L-Pg for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 09:44:01 -0400 Received: from plane.gmane.org ([80.91.229.3]:49135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf6oX-00027w-Jl for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 09:43:57 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zf6oV-0001rQ-TI for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 15:43:56 +0200 Received: from 193.63.221.9 ([193.63.221.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Sep 2015 15:43:55 +0200 Received: from andreas.leha by 193.63.221.9 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Sep 2015 15:43:55 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Alan, Alan Schmitt writes: > Hi Andreas, > > On 2015-09-24 14:14, Andreas Leha writes: > >> if all of this is for a single block, you can get away quite cheaply >> with sth along (untested) >> >> #+begin_src emacs-lisp :results silent >> (save-excursion >> ;; tangle >> (org-babel-goto-named-src-block "hello") >> (org-babel-tangle '(4))) >> #+end_src >> >> and make sure this gets executed during export. > > I’ve tried this and somehow it replaces the whole org file with > a version with comments and src block headers removed, and macros > expanded. I have no idea why it does this … > That's what I feared. So, you better go for the other suggestions in this thread, the hook or calling the export from that same source block -- now making sure not to evaluate the block again. Best, Andreas