emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Help tangling
@ 2014-04-02 19:49 Andreas Hilboll
  2014-04-02 21:04 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Hilboll @ 2014-04-02 19:49 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I want to write a "SConstruct" file (for SCons, a Python make
alternative) in orgmode, using literate programming.  So I have a file
"SConstruct.org", where I include the code blocks with "#+begin_src ...
#+end_src".  My question:

   How can I specify that *all* code blocks shall be tangled into one
single file called "SConstruct"?

I know I could do this by writing

   #+begin_src python :tangle SConstruct
   [...]
   #+end_src

instead of

   #+begin_src
   [...]
   #+end_src

but is there some way to define the "python" and the ":tangle
SConstruct" 'globally' for the whole file?

Thanks for helping me orgmode-newbie!

-- Andreas.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help tangling
  2014-04-02 19:49 Help tangling Andreas Hilboll
@ 2014-04-02 21:04 ` Eric Schulte
  2014-04-02 21:10   ` Andreas Hilboll
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2014-04-02 21:04 UTC (permalink / raw)
  To: Andreas Hilboll; +Cc: emacs-orgmode

Andreas Hilboll <lists@hilboll.de> writes:

> Hi,
>
> I want to write a "SConstruct" file (for SCons, a Python make
> alternative) in orgmode, using literate programming.  So I have a file
> "SConstruct.org", where I include the code blocks with "#+begin_src ...
> #+end_src".  My question:
>
>    How can I specify that *all* code blocks shall be tangled into one
> single file called "SConstruct"?
>
> I know I could do this by writing
>
>    #+begin_src python :tangle SConstruct
>    [...]
>    #+end_src
>
> instead of
>
>    #+begin_src
>    [...]
>    #+end_src
>
> but is there some way to define the "python"

no

> and the ":tangle SConstruct"

yes

#+Property: tangle SConstruct

> 'globally' for the whole file?
>
> Thanks for helping me orgmode-newbie!
>

Best,

>
> -- Andreas.
>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help tangling
  2014-04-02 21:04 ` Eric Schulte
@ 2014-04-02 21:10   ` Andreas Hilboll
  2014-04-02 23:05     ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Hilboll @ 2014-04-02 21:10 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

On 02.04.2014 23:04, Eric Schulte wrote:
> Andreas Hilboll <lists@hilboll.de> writes:
> 
>> Hi,
>>
>> I want to write a "SConstruct" file (for SCons, a Python make
>> alternative) in orgmode, using literate programming.  So I have a file
>> "SConstruct.org", where I include the code blocks with "#+begin_src ...
>> #+end_src".  My question:
>>
>>    How can I specify that *all* code blocks shall be tangled into one
>> single file called "SConstruct"?
>>
>> I know I could do this by writing
>>
>>    #+begin_src python :tangle SConstruct
>>    [...]
>>    #+end_src
>>
>> instead of
>>
>>    #+begin_src
>>    [...]
>>    #+end_src
>>
>> but is there some way to define the "python"
> 
> no
> 
>> and the ":tangle SConstruct"
> 
> yes
> 
> #+Property: tangle SConstruct
> 

Thanks for your feedback, Eric!  However, it doesn't seem to work properly.

The first two lines of my file read

   #+OPTIONS: toc:4 h:4
   #+PROPERTY: tangle SConstruct

and I have several code blocks like

   #+begin_src python
   [...]
   #+end_src

However, when I invoke org-babel-tangle, I get the message "Tangled 0
code blocks from SConstruct.org", and no output file is created.

Have I misunderstood you?  What am I doing wrong?

Cheers, Andreas.

>> 'globally' for the whole file?
>>
>> Thanks for helping me orgmode-newbie!
>>
> 
> Best,
> 
>>
>> -- Andreas.
>>
> 


-- 
-- Andreas.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help tangling
  2014-04-02 21:10   ` Andreas Hilboll
@ 2014-04-02 23:05     ` Eric Schulte
  2014-04-03 14:19       ` Andreas Hilboll
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2014-04-02 23:05 UTC (permalink / raw)
  To: Andreas Hilboll; +Cc: emacs-orgmode

>>> and the ":tangle SConstruct"
>> 
>> yes
>> 
>> #+Property: tangle SConstruct
>> 
>
> Thanks for your feedback, Eric!  However, it doesn't seem to work properly.
>
> The first two lines of my file read
>
>    #+OPTIONS: toc:4 h:4
>    #+PROPERTY: tangle SConstruct
>
> and I have several code blocks like
>
>    #+begin_src python
>    [...]
>    #+end_src
>
> However, when I invoke org-babel-tangle, I get the message "Tangled 0
> code blocks from SConstruct.org", and no output file is created.
>
> Have I misunderstood you?  What am I doing wrong?
>

You may have to C-c C-c on the property line so that it is re-read by
Emacs (which normally only happens when opening the file).

Best,

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help tangling
  2014-04-02 23:05     ` Eric Schulte
@ 2014-04-03 14:19       ` Andreas Hilboll
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Hilboll @ 2014-04-03 14:19 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

On 03.04.2014 01:05, Eric Schulte wrote:
>>>> and the ":tangle SConstruct"
>>>
>>> yes
>>>
>>> #+Property: tangle SConstruct
>>>
>>
>> Thanks for your feedback, Eric!  However, it doesn't seem to work properly.
>>
>> The first two lines of my file read
>>
>>    #+OPTIONS: toc:4 h:4
>>    #+PROPERTY: tangle SConstruct
>>
>> and I have several code blocks like
>>
>>    #+begin_src python
>>    [...]
>>    #+end_src
>>
>> However, when I invoke org-babel-tangle, I get the message "Tangled 0
>> code blocks from SConstruct.org", and no output file is created.
>>
>> Have I misunderstood you?  What am I doing wrong?
>>
> 
> You may have to C-c C-c on the property line so that it is re-read by
> Emacs (which normally only happens when opening the file).

Cool -- thanks =)

-- Andreas.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-03 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 19:49 Help tangling Andreas Hilboll
2014-04-02 21:04 ` Eric Schulte
2014-04-02 21:10   ` Andreas Hilboll
2014-04-02 23:05     ` Eric Schulte
2014-04-03 14:19       ` Andreas Hilboll

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).