From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Extract source code /with/ captions Date: Sun, 12 Jan 2014 22:49:20 +0800 Message-ID: Reply-To: jamshark70@dewdrop-world.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2MLq-0004L6-Fs for Emacs-orgmode@gnu.org; Sun, 12 Jan 2014 09:49:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2MLp-00006x-AQ for Emacs-orgmode@gnu.org; Sun, 12 Jan 2014 09:49:22 -0500 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:56462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2MLp-00006n-4h for Emacs-orgmode@gnu.org; Sun, 12 Jan 2014 09:49:21 -0500 Received: by mail-ob0-f177.google.com with SMTP id vb8so6698956obc.36 for ; Sun, 12 Jan 2014 06:49:20 -0800 (PST) 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" I'm working on a set of Beamer presentations with a bunch of source code blocks. I would like to collect all the blocks into one text file per presentation, but I also need the captions and ideally a numeric index. That is, I'm *not* looking for the normal behavior of org-babel-tangle, which assembles only the source code itself without any other identifying information (on the assumption that the tangled file should be OK to be compiled). These code blocks are not part of one big program. They are examples that workshop participants should run interactively. So, for instance, where the slideshow and handouts would have a code block identified like so: Listing 3: Compare geometric vs. band-limited waves, aurally. ... a student should be able to open up the corresponding code file and find: // Listing 3: Compare geometric vs. band-limited waves, aurally. Just wondering if anyone has done this. If not, I'm sure I can hack something up but it would save some time if somebody has some code lying around. Thanks in advance -- hjh