[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Literate Programming - Continue a Source Block?
From: |
Eric Schulte |
Subject: |
Re: [O] Literate Programming - Continue a Source Block? |
Date: |
Mon, 13 Jun 2011 14:57:18 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Neeum,
Neeum Zawan <address@hidden> writes:
> Eric Schulte <address@hidden> writes:
>
>> Hi Neeum,
>>
>> Thanks for your feedback. Your point is well taken about the
>> flexibility of header arguments, and the ability of a header argument
>> based solution to overwrite blocks.
>>
>> I would mention that variables such as the newly introduced
>> `org-babel-tangle-named-block-combination' may be easily set on a
>> per-file bases using file local variables---basically adding a line like
>> the following to the top of your Org-mode file.
>
> Somehow I couldn't get your new function to work. The variable is set to
> append, and I removed all org-modes from my system except the latest
> from git. I even ensured that this code gets executed:
>
> (append (mapconcat #'identity
> named "\n"))
>
> However, the output I get is the same as before - it just uses the first
> source block.
>
Could you try the attached example file? I first evaluated the
following elisp code to set the combination variable's value to append.
#+begin_src emacs-lisp
(setq org-babel-tangle-named-block-combination 'append)
#+end_src
I then call org-babel-tangle in the attached Org-mode file to generate
the attached elisp file.
combined-tangle-example.org
Description: Text Data
combined-tangle-example.el
Description: application/emacs-lisp
>
> Incidentally, why do we need "\n" as a separator? What if I wanted to
> do (in Python)
>
> def func(a, b, <<func_args>>):
> stuff
>
> In other words, I want to add more arguments later on. Wouldn't a \n
> mess things up here?
>
Ah, this is a good point. I've just changed the code to avoid inserting
superfluous newlines. Thanks!
Cheers -- Eric
>
>
> Thanks.
>
>
--
Eric Schulte
http://cs.unm.edu/~eschulte/
- Re: [O] Literate Programming - Continue a Source Block?, (continued)
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/13
- Re: [O] Literate Programming - Continue a Source Block?, Achim Gratz, 2011/06/14
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Achim Gratz, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/16
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/10
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/10
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/11
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/12
- Re: [O] Literate Programming - Continue a Source Block?,
Eric Schulte <=
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/16
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/17
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/17
- Re: [O] Literate Programming - Continue a Source Block?, Sebastien Vauban, 2011/06/17
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/19
- Re: [O] Literate Programming - Continue a Source Block?, Olaf.Hamann, 2011/06/16