emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [babel] Commenting out src blocks for tangling


From: Eric Schulte
Subject: Re: [O] [babel] Commenting out src blocks for tangling
Date: Sat, 19 Oct 2013 15:56:07 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Alan Schmitt <address@hidden> writes:

> address@hidden writes:
>
>>> I just tried it with my init file and it did not work. Here is a
>>> minimal example. Save this as "test.org":
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> * Testing
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (message "hello world")
>>> #+END_SRC
>>>
>>> * COMMENT Commenting
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (message "Salut le monde 2")
>>> #+END_SRC
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> Then do a "M-x org-babel-load-file" giving "test.org" as file name.
>>>
>>> If you look at *Messages*, or at the generated test.el, you will see the
>>> second block has been tangled.
>>>
>>> Am I missing something with this feature, or is this a bug? (I tried
>>> with "emacs -Q" and loading a current org, and the same happens.)
>>>
>>
>> I can't reproduce, both manual tangling and tangling through
>> org-babel-load-file only tangle the first block for me.  Maybe you
>> aren't using a current version of Org-mode.
>>
>> I'm on.
>>
>> Org-mode version 8.2.1 (release_8.2.1-99-g2eef1b @ 
>> /home/eschulte/src/org-mode/lisp/)
>
> Thanks, my version was a couple weeks old and the current version does
> work with this example. However I could not make it work with this
> slightly bigger example:
>
> --8<---------------cut here---------------start------------->8---
> * Testing
>
> #+BEGIN_SRC emacs-lisp
> (message "hello world")
> #+END_SRC
>
> * COMMENT Commenting
>
> #+BEGIN_SRC emacs-lisp
> (message "Salut le monde 2")
> #+END_SRC
>
> ** Testing sub tree
>
> #+BEGIN_SRC emacs-lisp
> (message "hello subtree")
> #+END_SRC
> --8<---------------cut here---------------end--------------->8---
>
> I see that "hello subtree" is tangled. Does it mean that to comment a
> whole tree I need to comment every subtree (recursively)?
>
> Thanks,
>
> Alan

I just pushed up a fix, thanks for catching this bug.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



reply via email to

[Prev in Thread] Current Thread [Next in Thread]