emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Feature Request: Allow Tangling Named INCLUDEs


From: Eric Schulte
Subject: Re: [O] Feature Request: Allow Tangling Named INCLUDEs
Date: Mon, 27 Jan 2014 07:37:08 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Rainer M Krug <address@hidden> writes:

> On 01/27/14, 01:44 , Nick Daly wrote:
>> Hi Bastien,
>>
>>> Nick Daly wrote:
>>>
>>>> Hi folks, I have a situation where I have many named code
>>>> snippets currently available in external files, and would like
>>>> to tangle them into an Org mode file.
>>
>> Bastien writes:
>>> I'm not the one who would undertake this, so my opinion on this
>>> should not matter much... but I think #+INCLUDE is well suited
>>> for exporting, not for tangling.  I'm not able to say why, this
>>> is just an intuition.
>>
>> It seems to me like it's trying to unify exporting and tangling:
>> this emphasizes that tangling is just another (very specific
>> plain-text) form of exporting.
>
> I agree here - I also see tangling as just a different export backend.
>
> I must say I like the idea of having #+INCLUDE expanded before export,
> as it would make using code libraries much easier. But one could even
> go one step further: not only include the complete file, but only a
> named source block - that would be perfect.
>
> Just wondering - wouldn't it be possible, to just put the function
> org-export-expand-include-keyword into the pre-tangle-hook?
>

Why don't you try it out and let us know.

>
> Cheers,
>
> Rainer
>
>> Using Eric's function for exporting allows me to remove lots of
>> boilerplate code from the source org file and keep the org source
>> better focused on the code's function and structure.
>>
>> Sure it's weird, but it sure is handy.
>>
>> Nick
>>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :       +33 - (0)9 53 10 27 44
> Cell:       +33 - (0)6 85 62 59 98
> Fax :       +33 - (0)9 58 10 27 44
>
> Fax (D):    +49 - (0)3 21 21 25 22 44
>
> email:      address@hidden
>
> Skype:      RMkrug

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



reply via email to

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