From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Deactivate babel source block Date: Wed, 09 Oct 2013 10:28:27 -0600 Message-ID: <871u3ucs7q.fsf@gmail.com> References: <87k3hqfnbj.fsf@gmail.com> <87vc163gya.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTwp7-0000z5-PE for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 12:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTwp3-0002ax-FA for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 12:41:21 -0400 Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]:43872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTwp3-0002ad-7V for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 12:41:17 -0400 Received: by mail-pb0-f46.google.com with SMTP id rq2so1165654pbb.5 for ; Wed, 09 Oct 2013 09:41:16 -0700 (PDT) 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: Rainer M Krug Cc: emacs-orgmode@gnu.org Eric S Fraga writes: > Rainer M Krug writes: > > [...] > >> Correct me if I am wrong, but I seem to remember that source blocks >> under a commented heading are not tangled? >> >> But I just tried it now, and it doesn't seem to be the case anymore - >> code blocks under commented header are still tangled - has this feature >> been removed or was it never there? > > It was there; we had a discussion about this early this year. There is > a commit log entry indicating that this was implemented: > > ,---- > | commit 8e0b4529f780de4e442d26a7ba4aedd892c78c5b > | Author: Bastien Guerry > | Date: Thu Feb 28 10:25:21 2013 +0100 > | > | ob-tangle.el (org-babel-tangle-collect-blocks): Don't collect blocks in commented out headings > | > | * ob-tangle.el (org-babel-tangle-collect-blocks): Don't > | collect blocks in commented out headings. > | > | Thansk to the various people who requested this. > `---- > > but I also found recently that code blocks in commented sections are > indeed tangled. > > I have no idea what has happened to the code since. It looks like commit 17131cb broke the heading handling of `org-babel-tangle-collect-blocks' by removing the application of an anonymous lambda function. I just pushed up a fix which reapplies this function, and tangles the following file correctly (i.e., does not tangle the commented heading). Thanks for pointing this out. Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D