all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* source code block export no expansion
@ 2010-12-07 17:38 Andreas Leha
  2010-12-07 18:37 ` Thomas S. Dye
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2010-12-07 17:38 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 869 bytes --]

Hi all,

I have a question about exporting source code blocks.  Say, I have
several modules (mod1, mod2), that build a bigger part (part1) of my
program, e.g.:


  #+srcname: mod1
  #+begin_src R :tangle no :export code
    print("mod1")
  #+end_src

  #+srcname: mod2
  #+begin_src R :tangle no :export code
    print("mod2")
  #+end_src

  #+srcname: part1
  #+begin_src R :noweb yes :tangle yes :export code :session *R*
    <<mod1>>
    <<mod2>>
  #+end_src

 
Now during the tangling I would like to tangle just the full part1 -
with noweb links being expanded.  Also during execution the noweb links
should be expanded.  This is not a problem.

But at the same time, during the export I'd like to export all three
code snippets, but I'd prefer the noweb links not to be expanded.  Is
that possible?

Thanks in advance,
Andreas


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 6432 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-07 17:38 source code block export no expansion Andreas Leha
@ 2010-12-07 18:37 ` Thomas S. Dye
  2010-12-07 18:49   ` Andreas Leha
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2010-12-07 18:37 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode

Aloha Andreas,

Perhaps :noweb tangle will do what you want.

hth,
Tom

On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:

> Hi all,
>
> I have a question about exporting source code blocks.  Say, I have
> several modules (mod1, mod2), that build a bigger part (part1) of my
> program, e.g.:
>
>
>  #+srcname: mod1
>  #+begin_src R :tangle no :export code
>    print("mod1")
>  #+end_src
>
>  #+srcname: mod2
>  #+begin_src R :tangle no :export code
>    print("mod2")
>  #+end_src
>
>  #+srcname: part1
>  #+begin_src R :noweb yes :tangle yes :export code :session *R*
>    <<mod1>>
>    <<mod2>>
>  #+end_src
>
>
> Now during the tangling I would like to tangle just the full part1 -
> with noweb links being expanded.  Also during execution the noweb  
> links
> should be expanded.  This is not a problem.
>
> But at the same time, during the export I'd like to export all three
> code snippets, but I'd prefer the noweb links not to be expanded.  Is
> that possible?
>
> Thanks in advance,
> Andreas
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-07 18:37 ` Thomas S. Dye
@ 2010-12-07 18:49   ` Andreas Leha
  2010-12-07 19:33     ` Thomas S. Dye
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2010-12-07 18:49 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3033 bytes --]

Hi Tom,

thanks for this answer.  This indeed comes closer to what I want.

But, some comments:

(1) There seems to be an error in the manual:
In the manual the :noweb tangle header argument is given as :noweb yes,
which is why I missed that option.

(2) The noweb link are expanded *always* (i.e. execution, export,
tangle) even with the :noweb tangle option:
  #+srcname: mod1
  #+begin_src R :tangle no :export code
    print("mod1")
  #+end_src

  #+srcname: mod2
  #+begin_src R :tangle no :export code
    print("mod2")
  #+end_src

  #+srcname: part1
  #+begin_src R :noweb tangle :tangle yes :export code :session *R*
    <<mod1>>
    <<mod2>>
  #+end_src


(3) I am looking for an option to disable the noweb link expansion
during *export* only.  However, as I understand it, the :noweb tangle
header option is supposed to disable the expansion also for *execution*.


So, is this not possible right now?

Cheers,
Andreas



Am 07.12.2010 19:37, schrieb Thomas S. Dye:
> Aloha Andreas,
>
> Perhaps :noweb tangle will do what you want.
>
> hth,
> Tom
>
> On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:
>
>> Hi all,
>>
>> I have a question about exporting source code blocks.  Say, I have
>> several modules (mod1, mod2), that build a bigger part (part1) of my
>> program, e.g.:
>>
>>
>>  #+srcname: mod1
>>  #+begin_src R :tangle no :export code
>>    print("mod1")
>>  #+end_src
>>
>>  #+srcname: mod2
>>  #+begin_src R :tangle no :export code
>>    print("mod2")
>>  #+end_src
>>
>>  #+srcname: part1
>>  #+begin_src R :noweb yes :tangle yes :export code :session *R*
>>    <<mod1>>
>>    <<mod2>>
>>  #+end_src
>>
>>
>> Now during the tangling I would like to tangle just the full part1 -
>> with noweb links being expanded.  Also during execution the noweb links
>> should be expanded.  This is not a problem.
>>
>> But at the same time, during the export I'd like to export all three
>> code snippets, but I'd prefer the noweb links not to be expanded.  Is
>> that possible?
>>
>> Thanks in advance,
>> Andreas
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

-- 
Andreas Leha

Universitätsmedizin Göttingen
Abteilung Medizinische Statistik
Humboldtallee 32
37073 Göttingen

Tel: +49 (0)551 39-10710
Fax: +49 (0)551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha.html



University Medical Center Göttingen
Department for Medical Statistics
Humboldtallee 32
37073 Göttingen
Germany

Phone: +49 (0) 551 39-10710
Fax: +49 (0) 551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html



[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 6432 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-07 18:49   ` Andreas Leha
@ 2010-12-07 19:33     ` Thomas S. Dye
  2010-12-07 19:46       ` Andreas Leha
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2010-12-07 19:33 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3951 bytes --]

Aloha Andreas,

On Dec 7, 2010, at 8:49 AM, Andreas Leha wrote:

> Hi Tom,
>
> thanks for this answer.  This indeed comes closer to what I want.
>
> But, some comments:
>
> (1) There seems to be an error in the manual:
> In the manual the :noweb tangle header argument is given as :noweb  
> yes,
> which is why I missed that option.

I believe this is fixed at the source now, but am not sure how long it  
will take to propagate to the distributed documentation.

> (2) The noweb link are expanded *always* (i.e. execution, export,
> tangle) even with the :noweb tangle option:
>  #+srcname: mod1
>  #+begin_src R :tangle no :export code
>    print("mod1")
>  #+end_src
>
>  #+srcname: mod2
>  #+begin_src R :tangle no :export code
>    print("mod2")
>  #+end_src
>
>  #+srcname: part1
>  #+begin_src R :noweb tangle :tangle yes :export code :session *R*
>    <<mod1>>
>    <<mod2>>
>  #+end_src
>
>

Perhaps this has to do with using :export instead of the correct  
header argument, :exports?

> (3) I am looking for an option to disable the noweb link expansion
> during *export* only.  However, as I understand it, the :noweb tangle
> header option is supposed to disable the expansion also for  
> *execution*.

This isn't how it works for me.  :noweb tangle inhibits noweb  
expansion during export only.

>
> So, is this not possible right now?
>

It is possible now.  If the :exports header argument doesn't fix your  
problem, come back to the list.

All the best,
Tom

> Cheers,
> Andreas
>
>
>
> Am 07.12.2010 19:37, schrieb Thomas S. Dye:
>> Aloha Andreas,
>>
>> Perhaps :noweb tangle will do what you want.
>>
>> hth,
>> Tom
>>
>> On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:
>>
>>> Hi all,
>>>
>>> I have a question about exporting source code blocks.  Say, I have
>>> several modules (mod1, mod2), that build a bigger part (part1) of my
>>> program, e.g.:
>>>
>>>
>>> #+srcname: mod1
>>> #+begin_src R :tangle no :export code
>>>   print("mod1")
>>> #+end_src
>>>
>>> #+srcname: mod2
>>> #+begin_src R :tangle no :export code
>>>   print("mod2")
>>> #+end_src
>>>
>>> #+srcname: part1
>>> #+begin_src R :noweb yes :tangle yes :export code :session *R*
>>>   <<mod1>>
>>>   <<mod2>>
>>> #+end_src
>>>
>>>
>>> Now during the tangling I would like to tangle just the full part1 -
>>> with noweb links being expanded.  Also during execution the noweb  
>>> links
>>> should be expanded.  This is not a problem.
>>>
>>> But at the same time, during the export I'd like to export all three
>>> code snippets, but I'd prefer the noweb links not to be expanded.   
>>> Is
>>> that possible?
>>>
>>> Thanks in advance,
>>> Andreas
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> -- 
> Andreas Leha
>
> Universitätsmedizin Göttingen
> Abteilung Medizinische Statistik
> Humboldtallee 32
> 37073 Göttingen
>
> Tel: +49 (0)551 39-10710
> Fax: +49 (0)551 39-4995
>
> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>
>
>
> University Medical Center Göttingen
> Department for Medical Statistics
> Humboldtallee 32
> 37073 Göttingen
> Germany
>
> Phone: +49 (0) 551 39-10710
> Fax: +49 (0) 551 39-4995
>
> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 8889 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-07 19:33     ` Thomas S. Dye
@ 2010-12-07 19:46       ` Andreas Leha
  2010-12-07 20:14         ` Thomas S. Dye
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2010-12-07 19:46 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode


[-- Attachment #1.1.1: Type: text/plain, Size: 5253 bytes --]

Hi Tom,

thanks for the answer and thanks for spotting the typo.  But even with
the typo corrected during export the noweb links are still exported.
  #+srcname: mod1
  #+begin_src R :tangle no :export code
    print("mod1")
  #+end_src

  #+srcname: mod2
  #+begin_src R :tangle no :export code
    print("mod2")
  #+end_src

  #+srcname: part1
  #+begin_src R :noweb tangle :tangle yes :exports code :session *R*
    <<mod1>>
    <<mod2>>
  #+end_src

Result:
...
\lstset{language=R}
\begin{lstlisting}
print("mod1")
print("mod2")
\end{lstlisting}
...



Am 07.12.2010 20:33, schrieb Thomas S. Dye:
> Aloha Andreas,
>
> On Dec 7, 2010, at 8:49 AM, Andreas Leha wrote:
>
>> Hi Tom,
>>
>> thanks for this answer.  This indeed comes closer to what I want.
>>
>> But, some comments:
>>
>> (1) There seems to be an error in the manual:
>> In the manual the :noweb tangle header argument is given as :noweb yes,
>> which is why I missed that option.
>
> I believe this is fixed at the
> source now, but am not sure how long it will take to propagate to the
> distributed documentation.
>
>> (2) The noweb link are expanded *always* (i.e. execution, export,
>> tangle) even with the :noweb tangle option:
>>  #+srcname: mod1
>>  #+begin_src R :tangle no :export code
>>    print("mod1")
>>  #+end_src
>>
>>  #+srcname: mod2
>>  #+begin_src R :tangle no :export code
>>    print("mod2")
>>  #+end_src
>>
>>  #+srcname: part1
>>  #+begin_src R :noweb tangle :tangle yes :export code :session *R*
>>    <<mod1>>
>>    <<mod2>>
>>  #+end_src
>>
>>
>
> Perhaps this has to do with using :export instead of the correct
> header argument, :exports?
>
>> (3) I am looking for an option to disable the noweb link expansion
>> during *export* only.  However, as I understand it, the :noweb tangle
>> header option is supposed to disable the expansion also for *execution*.
>
> This isn't how it works for me.  :noweb tangle inhibits noweb expansion during export only.
>
>>
>> So, is this not possible right now?
>>
>
> It is possible now.  If the :exports header argument doesn't fix your
> problem, come back to the list.
>
> All the best,
> Tom
>
>> Cheers,
>> Andreas
>>
>>
>>
>> Am 07.12.2010 19:37, schrieb Thomas S. Dye:
>>> Aloha Andreas,
>>>
>>> Perhaps :noweb tangle will do what you want.
>>>
>>> hth,
>>> Tom
>>>
>>> On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have a question about exporting source code blocks.  Say, I have
>>>> several modules (mod1, mod2), that build a bigger part (part1) of my
>>>> program, e.g.:
>>>>
>>>>
>>>> #+srcname: mod1
>>>> #+begin_src R :tangle no :export code
>>>>   print("mod1")
>>>> #+end_src
>>>>
>>>> #+srcname: mod2
>>>> #+begin_src R :tangle no :export code
>>>>   print("mod2")
>>>> #+end_src
>>>>
>>>> #+srcname: part1
>>>> #+begin_src R :noweb yes :tangle yes :export code :session *R*
>>>>   <<mod1>>
>>>>   <<mod2>>
>>>> #+end_src
>>>>
>>>>
>>>> Now during the tangling I would like to tangle just the full part1 -
>>>> with noweb links being expanded.  Also during execution the noweb links
>>>> should be expanded.  This is not a problem.
>>>>
>>>> But at the same time, during the export I'd like to export all three
>>>> code snippets, but I'd prefer the noweb links not to be expanded.  Is
>>>> that possible?
>>>>
>>>> Thanks in advance,
>>>> Andreas
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Please use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> -- 
>> Andreas Leha
>>
>> Universitätsmedizin Göttingen
>> Abteilung Medizinische Statistik
>> Humboldtallee 32
>> 37073 Göttingen
>>
>> Tel: +49 (0)551 39-10710
>> Fax: +49 (0)551 39-4995
>>
>> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>>
>>
>>
>> University Medical Center Göttingen
>> Department for Medical Statistics
>> Humboldtallee 32
>> 37073 Göttingen
>> Germany
>>
>> Phone: +49 (0) 551 39-10710
>> Fax: +49 (0) 551 39-4995
>>
>> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

-- 
Andreas Leha

Universitätsmedizin Göttingen
Abteilung Medizinische Statistik
Humboldtallee 32
37073 Göttingen

Tel: +49 (0)551 39-10710
Fax: +49 (0)551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha.html



University Medical Center Göttingen
Department for Medical Statistics
Humboldtallee 32
37073 Göttingen
Germany

Phone: +49 (0) 551 39-10710
Fax: +49 (0) 551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html


[-- Attachment #1.1.2: Type: text/html, Size: 12907 bytes --]

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 6432 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-07 19:46       ` Andreas Leha
@ 2010-12-07 20:14         ` Thomas S. Dye
  2010-12-08  6:55           ` Andreas Leha
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2010-12-07 20:14 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 5907 bytes --]

Aloha Andreas,

Thanks for your patience and persistence.  I think this might qualify  
as a bug.  Using your code, if I don't run R in a session, or if I run  
R in a session but don't name the session, everything works as  
expected.  The behavior changes for me when the session gets a name.

All the best,
Tom


On Dec 7, 2010, at 9:46 AM, Andreas Leha wrote:

> Hi Tom,
>
> thanks for the answer and thanks for spotting the typo.  But even  
> with the typo corrected during export the noweb links are still  
> exported.
>   #+srcname: mod1
>   #+begin_src R :tangle no :export code
>     print("mod1")
>   #+end_src
>
>   #+srcname: mod2
>   #+begin_src R :tangle no :export code
>     print("mod2")
>   #+end_src
>
>   #+srcname: part1
>   #+begin_src R :noweb tangle :tangle yes :exports code :session *R*
>     <<mod1>>
>     <<mod2>>
>   #+end_src
>
> Result:
> ...
> \lstset{language=R}
> \begin{lstlisting}
> print("mod1")
> print("mod2")
> \end{lstlisting}
> ...
>
>
>
> Am 07.12.2010 20:33, schrieb Thomas S. Dye:
>>
>> Aloha Andreas,
>>
>> On Dec 7, 2010, at 8:49 AM, Andreas Leha wrote:
>>
>>> Hi Tom,
>>>
>>> thanks for this answer.  This indeed comes closer to what I want.
>>>
>>> But, some comments:
>>>
>>> (1) There seems to be an error in the manual:
>>> In the manual the :noweb tangle header argument is given as :noweb  
>>> yes,
>>> which is why I missed that option.
>>
>> I believe this is fixed at the source now, but am not sure how long  
>> it will take to propagate to the distributed documentation.
>>
>>> (2) The noweb link are expanded *always* (i.e. execution, export,
>>> tangle) even with the :noweb tangle option:
>>>  #+srcname: mod1
>>>  #+begin_src R :tangle no :export code
>>>    print("mod1")
>>>  #+end_src
>>>
>>>  #+srcname: mod2
>>>  #+begin_src R :tangle no :export code
>>>    print("mod2")
>>>  #+end_src
>>>
>>>  #+srcname: part1
>>>  #+begin_src R :noweb tangle :tangle yes :export code :session *R*
>>>    <<mod1>>
>>>    <<mod2>>
>>>  #+end_src
>>>
>>>
>>
>> Perhaps this has to do with using :export instead of the correct  
>> header argument, :exports?
>>
>>> (3) I am looking for an option to disable the noweb link expansion
>>> during *export* only.  However, as I understand it, the :noweb  
>>> tangle
>>> header option is supposed to disable the expansion also for  
>>> *execution*.
>>
>> This isn't how it works for me.  :noweb tangle inhibits noweb  
>> expansion during export only.
>>
>>>
>>> So, is this not possible right now?
>>>
>>
>> It is possible now.  If the :exports header argument doesn't fix  
>> your problem, come back to the list.
>>
>> All the best,
>> Tom
>>
>>> Cheers,
>>> Andreas
>>>
>>>
>>>
>>> Am 07.12.2010 19:37, schrieb Thomas S. Dye:
>>>> Aloha Andreas,
>>>>
>>>> Perhaps :noweb tangle will do what you want.
>>>>
>>>> hth,
>>>> Tom
>>>>
>>>> On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a question about exporting source code blocks.  Say, I have
>>>>> several modules (mod1, mod2), that build a bigger part (part1)  
>>>>> of my
>>>>> program, e.g.:
>>>>>
>>>>>
>>>>> #+srcname: mod1
>>>>> #+begin_src R :tangle no :export code
>>>>>   print("mod1")
>>>>> #+end_src
>>>>>
>>>>> #+srcname: mod2
>>>>> #+begin_src R :tangle no :export code
>>>>>   print("mod2")
>>>>> #+end_src
>>>>>
>>>>> #+srcname: part1
>>>>> #+begin_src R :noweb yes :tangle yes :export code :session *R*
>>>>>   <<mod1>>
>>>>>   <<mod2>>
>>>>> #+end_src
>>>>>
>>>>>
>>>>> Now during the tangling I would like to tangle just the full  
>>>>> part1 -
>>>>> with noweb links being expanded.  Also during execution the  
>>>>> noweb links
>>>>> should be expanded.  This is not a problem.
>>>>>
>>>>> But at the same time, during the export I'd like to export all  
>>>>> three
>>>>> code snippets, but I'd prefer the noweb links not to be  
>>>>> expanded.  Is
>>>>> that possible?
>>>>>
>>>>> Thanks in advance,
>>>>> Andreas
>>>>>
>>>>> _______________________________________________
>>>>> Emacs-orgmode mailing list
>>>>> Please use `Reply All' to send replies to the list.
>>>>> Emacs-orgmode@gnu.org
>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Please use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>> -- 
>>> Andreas Leha
>>>
>>> Universitätsmedizin Göttingen
>>> Abteilung Medizinische Statistik
>>> Humboldtallee 32
>>> 37073 Göttingen
>>>
>>> Tel: +49 (0)551 39-10710
>>> Fax: +49 (0)551 39-4995
>>>
>>> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>>>
>>>
>>>
>>> University Medical Center Göttingen
>>> Department for Medical Statistics
>>> Humboldtallee 32
>>> 37073 Göttingen
>>> Germany
>>>
>>> Phone: +49 (0) 551 39-10710
>>> Fax: +49 (0) 551 39-4995
>>>
>>> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
> -- 
> Andreas Leha
>
> Universitätsmedizin Göttingen
> Abteilung Medizinische Statistik
> Humboldtallee 32
> 37073 Göttingen
>
> Tel: +49 (0)551 39-10710
> Fax: +49 (0)551 39-4995
>
> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>
>
>
> University Medical Center Göttingen
> Department for Medical Statistics
> Humboldtallee 32
> 37073 Göttingen
> Germany
>
> Phone: +49 (0) 551 39-10710
> Fax: +49 (0) 551 39-4995
>
> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html


[-- Attachment #1.2: Type: text/html, Size: 12733 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-07 20:14         ` Thomas S. Dye
@ 2010-12-08  6:55           ` Andreas Leha
  2010-12-08 16:49             ` Thomas S. Dye
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2010-12-08  6:55 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1.1: Type: text/plain, Size: 6662 bytes --]

Hi Tom,

thanks a lot for looking into it!  Fixing this is unfortunately off my
limits.

But for me the unnamed session is a valid work-around for me, since I do
not need several sessions right now.  Thanks for this hint.

Cheers,
Andreas



Am 07.12.2010 21:14, schrieb Thomas S. Dye:
> Aloha Andreas,
>
> Thanks for your patience and persistence.  I think this might qualify
> as a bug.  Using your code, if I don't run R in a session, or if I run
> R in a session but don't name the session,
> everything works as expected.  The behavior changes for me when the
> session gets a name.
>
> All the best,
> Tom
>
>
> On Dec 7, 2010, at 9:46 AM, Andreas Leha wrote:
>
>> Hi Tom,
>>
>> thanks for the answer and thanks for spotting the typo.  But even
>> with the typo corrected during export the noweb links are still exported.
>>   #+srcname: mod1
>>   #+begin_src R :tangle no :export code
>>     print("mod1")
>>   #+end_src
>>
>>   #+srcname: mod2
>>   #+begin_src R :tangle no :export code
>>     print("mod2")
>>   #+end_src
>>
>>   #+srcname: part1
>>   #+begin_src R :noweb tangle :tangle yes :exports code :session *R*
>>     <<mod1>>
>>     <<mod2>>
>>   #+end_src
>>
>> Result:
>> ...
>> \lstset{language=R}
>> \begin{lstlisting}
>> print("mod1")
>> print("mod2")
>> \end{lstlisting}
>> ...
>>
>>
>>
>> Am 07.12.2010 20:33, schrieb Thomas S. Dye:
>>> Aloha Andreas,
>>>
>>> On Dec 7, 2010, at 8:49 AM, Andreas Leha wrote:
>>>
>>>> Hi Tom,
>>>>
>>>> thanks for this answer.  This indeed comes closer to what I want.
>>>>
>>>> But, some comments:
>>>>
>>>> (1) There seems to be an error in the manual:
>>>> In the manual the :noweb tangle header argument is given as :noweb yes,
>>>> which is why I missed that option.
>>>
>>> I believe this is fixed at the
>>> source now, but am not sure how long it will take to propagate to
>>> the distributed documentation.
>>>
>>>> (2) The noweb link are expanded *always* (i.e. execution, export,
>>>> tangle) even with the :noweb tangle option:
>>>>  #+srcname: mod1
>>>>  #+begin_src R :tangle no :export code
>>>>    print("mod1")
>>>>  #+end_src
>>>>
>>>>  #+srcname: mod2
>>>>  #+begin_src R :tangle no :export code
>>>>    print("mod2")
>>>>  #+end_src
>>>>
>>>>  #+srcname: part1
>>>>  #+begin_src R :noweb tangle :tangle yes :export code :session *R*
>>>>    <<mod1>>
>>>>    <<mod2>>
>>>>  #+end_src
>>>>
>>>>
>>>
>>> Perhaps this has to do with using :export instead of the correct
>>> header argument, :exports?
>>>
>>>> (3) I am looking for an option to disable the noweb link expansion
>>>> during *export* only.  However, as I understand it, the :noweb tangle
>>>> header option is supposed to disable the expansion also for
>>>> *execution*.
>>>
>>> This isn't how it works for me.  :noweb tangle inhibits noweb expansion during export only.
>>>
>>>>
>>>> So, is this not possible right now?
>>>>
>>>
>>> It is possible now.  If the :exports header argument doesn't fix
>>> your problem, come back to the list.
>>>
>>> All the best,
>>> Tom
>>>
>>>> Cheers,
>>>> Andreas
>>>>
>>>>
>>>>
>>>> Am 07.12.2010 19:37, schrieb Thomas S. Dye:
>>>>> Aloha Andreas,
>>>>>
>>>>> Perhaps :noweb tangle will do what you want.
>>>>>
>>>>> hth,
>>>>> Tom
>>>>>
>>>>> On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I have a question about exporting source code blocks.  Say, I have
>>>>>> several modules (mod1, mod2), that build a bigger part (part1) of my
>>>>>> program, e.g.:
>>>>>>
>>>>>>
>>>>>> #+srcname: mod1
>>>>>> #+begin_src R :tangle no :export code
>>>>>>   print("mod1")
>>>>>> #+end_src
>>>>>>
>>>>>> #+srcname: mod2
>>>>>> #+begin_src R :tangle no :export code
>>>>>>   print("mod2")
>>>>>> #+end_src
>>>>>>
>>>>>> #+srcname: part1
>>>>>> #+begin_src R :noweb yes :tangle yes :export code :session *R*
>>>>>>   <<mod1>>
>>>>>>   <<mod2>>
>>>>>> #+end_src
>>>>>>
>>>>>>
>>>>>> Now during the tangling I would like to tangle just the full part1 -
>>>>>> with noweb links being expanded.  Also during execution the noweb
>>>>>> links
>>>>>> should be expanded.  This is not a problem.
>>>>>>
>>>>>> But at the same time, during the export I'd like to export all three
>>>>>> code snippets, but I'd prefer the noweb links not to be expanded.  Is
>>>>>> that possible?
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Andreas
>>>>>>
>>>>>> _______________________________________________
>>>>>> Emacs-orgmode mailing list
>>>>>> Please use `Reply All' to send replies to the list.
>>>>>> Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>
>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Emacs-orgmode mailing list
>>>>> Please use `Reply All' to send replies to the list.
>>>>> Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>
>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>
>>>> -- 
>>>> Andreas Leha
>>>>
>>>> Universitätsmedizin Göttingen
>>>> Abteilung Medizinische Statistik
>>>> Humboldtallee 32
>>>> 37073 Göttingen
>>>>
>>>> Tel: +49 (0)551 39-10710
>>>> Fax: +49 (0)551 39-4995
>>>>
>>>> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>>>>
>>>>
>>>>
>>>> University Medical Center Göttingen
>>>> Department for Medical Statistics
>>>> Humboldtallee 32
>>>> 37073 Göttingen
>>>> Germany
>>>>
>>>> Phone: +49 (0) 551 39-10710
>>>> Fax: +49 (0) 551 39-4995
>>>>
>>>> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>>>>
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Please use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>
>> -- 
>> Andreas Leha
>>
>> Universitätsmedizin Göttingen
>> Abteilung Medizinische Statistik
>> Humboldtallee 32
>> 37073 Göttingen
>>
>> Tel: +49 (0)551 39-10710
>> Fax: +49 (0)551 39-4995
>>
>> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>>
>>
>>
>> University Medical Center Göttingen
>> Department for Medical Statistics
>> Humboldtallee 32
>> 37073 Göttingen
>> Germany
>>
>> Phone: +49 (0) 551 39-10710
>> Fax: +49 (0) 551 39-4995
>>
>> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>>     
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>   

[-- Attachment #1.1.2: Type: text/html, Size: 15762 bytes --]

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 6432 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: source code block export no expansion
  2010-12-08  6:55           ` Andreas Leha
@ 2010-12-08 16:49             ` Thomas S. Dye
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas S. Dye @ 2010-12-08 16:49 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 7362 bytes --]

Hi Andreas,

I've put a bug report on Eric and Dan's stack.  Thanks again for  
pointing this out.

All the best,
Tom

On Dec 7, 2010, at 8:55 PM, Andreas Leha wrote:

> Hi Tom,
>
> thanks a lot for looking into it!  Fixing this is unfortunately off  
> my limits.
>
> But for me the unnamed session is a valid work-around for me, since  
> I do not need several sessions right now.  Thanks for this hint.
>
> Cheers,
> Andreas
>
>
>
> Am 07.12.2010 21:14, schrieb Thomas S. Dye:
>>
>> Aloha Andreas,
>>
>> Thanks for your patience and persistence.  I think this might  
>> qualify as a bug.  Using your code, if I don't run R in a session,  
>> or if I run R in a session but don't name the session, everything  
>> works as expected.  The behavior changes for me when the session  
>> gets a name.
>>
>> All the best,
>> Tom
>>
>>
>> On Dec 7, 2010, at 9:46 AM, Andreas Leha wrote:
>>
>>> Hi Tom,
>>>
>>> thanks for the answer and thanks for spotting the typo.  But even  
>>> with the typo corrected during export the noweb links are still  
>>> exported.
>>>   #+srcname: mod1
>>>   #+begin_src R :tangle no :export code
>>>     print("mod1")
>>>   #+end_src
>>>
>>>   #+srcname: mod2
>>>   #+begin_src R :tangle no :export code
>>>     print("mod2")
>>>   #+end_src
>>>
>>>   #+srcname: part1
>>>   #+begin_src R :noweb tangle :tangle yes :exports code :session *R*
>>>     <<mod1>>
>>>     <<mod2>>
>>>   #+end_src
>>>
>>> Result:
>>> ...
>>> \lstset{language=R}
>>> \begin{lstlisting}
>>> print("mod1")
>>> print("mod2")
>>> \end{lstlisting}
>>> ...
>>>
>>>
>>>
>>> Am 07.12.2010 20:33, schrieb Thomas S. Dye:
>>>>
>>>> Aloha Andreas,
>>>>
>>>> On Dec 7, 2010, at 8:49 AM, Andreas Leha wrote:
>>>>
>>>>> Hi Tom,
>>>>>
>>>>> thanks for this answer.  This indeed comes closer to what I want.
>>>>>
>>>>> But, some comments:
>>>>>
>>>>> (1) There seems to be an error in the manual:
>>>>> In the manual the :noweb tangle header argument is given  
>>>>> as :noweb yes,
>>>>> which is why I missed that option.
>>>>
>>>> I believe this is fixed at the source now, but am not sure how  
>>>> long it will take to propagate to the distributed documentation.
>>>>
>>>>> (2) The noweb link are expanded *always* (i.e. execution, export,
>>>>> tangle) even with the :noweb tangle option:
>>>>>  #+srcname: mod1
>>>>>  #+begin_src R :tangle no :export code
>>>>>    print("mod1")
>>>>>  #+end_src
>>>>>
>>>>>  #+srcname: mod2
>>>>>  #+begin_src R :tangle no :export code
>>>>>    print("mod2")
>>>>>  #+end_src
>>>>>
>>>>>  #+srcname: part1
>>>>>  #+begin_src R :noweb tangle :tangle yes :export code :session *R*
>>>>>    <<mod1>>
>>>>>    <<mod2>>
>>>>>  #+end_src
>>>>>
>>>>>
>>>>
>>>> Perhaps this has to do with using :export instead of the correct  
>>>> header argument, :exports?
>>>>
>>>>> (3) I am looking for an option to disable the noweb link expansion
>>>>> during *export* only.  However, as I understand it, the :noweb  
>>>>> tangle
>>>>> header option is supposed to disable the expansion also for  
>>>>> *execution*.
>>>>
>>>> This isn't how it works for me.  :noweb tangle inhibits noweb  
>>>> expansion during export only.
>>>>
>>>>>
>>>>> So, is this not possible right now?
>>>>>
>>>>
>>>> It is possible now.  If the :exports header argument doesn't fix  
>>>> your problem, come back to the list.
>>>>
>>>> All the best,
>>>> Tom
>>>>
>>>>> Cheers,
>>>>> Andreas
>>>>>
>>>>>
>>>>>
>>>>> Am 07.12.2010 19:37, schrieb Thomas S. Dye:
>>>>>> Aloha Andreas,
>>>>>>
>>>>>> Perhaps :noweb tangle will do what you want.
>>>>>>
>>>>>> hth,
>>>>>> Tom
>>>>>>
>>>>>> On Dec 7, 2010, at 7:38 AM, Andreas Leha wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I have a question about exporting source code blocks.  Say, I  
>>>>>>> have
>>>>>>> several modules (mod1, mod2), that build a bigger part (part1)  
>>>>>>> of my
>>>>>>> program, e.g.:
>>>>>>>
>>>>>>>
>>>>>>> #+srcname: mod1
>>>>>>> #+begin_src R :tangle no :export code
>>>>>>>   print("mod1")
>>>>>>> #+end_src
>>>>>>>
>>>>>>> #+srcname: mod2
>>>>>>> #+begin_src R :tangle no :export code
>>>>>>>   print("mod2")
>>>>>>> #+end_src
>>>>>>>
>>>>>>> #+srcname: part1
>>>>>>> #+begin_src R :noweb yes :tangle yes :export code :session *R*
>>>>>>>   <<mod1>>
>>>>>>>   <<mod2>>
>>>>>>> #+end_src
>>>>>>>
>>>>>>>
>>>>>>> Now during the tangling I would like to tangle just the full  
>>>>>>> part1 -
>>>>>>> with noweb links being expanded.  Also during execution the  
>>>>>>> noweb links
>>>>>>> should be expanded.  This is not a problem.
>>>>>>>
>>>>>>> But at the same time, during the export I'd like to export all  
>>>>>>> three
>>>>>>> code snippets, but I'd prefer the noweb links not to be  
>>>>>>> expanded.  Is
>>>>>>> that possible?
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Andreas
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Emacs-orgmode mailing list
>>>>>>> Please use `Reply All' to send replies to the list.
>>>>>>> Emacs-orgmode@gnu.org
>>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Emacs-orgmode mailing list
>>>>>> Please use `Reply All' to send replies to the list.
>>>>>> Emacs-orgmode@gnu.org
>>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>>
>>>>> -- 
>>>>> Andreas Leha
>>>>>
>>>>> Universitätsmedizin Göttingen
>>>>> Abteilung Medizinische Statistik
>>>>> Humboldtallee 32
>>>>> 37073 Göttingen
>>>>>
>>>>> Tel: +49 (0)551 39-10710
>>>>> Fax: +49 (0)551 39-4995
>>>>>
>>>>> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>>>>>
>>>>>
>>>>>
>>>>> University Medical Center Göttingen
>>>>> Department for Medical Statistics
>>>>> Humboldtallee 32
>>>>> 37073 Göttingen
>>>>> Germany
>>>>>
>>>>> Phone: +49 (0) 551 39-10710
>>>>> Fax: +49 (0) 551 39-4995
>>>>>
>>>>> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Emacs-orgmode mailing list
>>>>> Please use `Reply All' to send replies to the list.
>>>>> Emacs-orgmode@gnu.org
>>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>
>>>
>>> -- 
>>> Andreas Leha
>>>
>>> Universitätsmedizin Göttingen
>>> Abteilung Medizinische Statistik
>>> Humboldtallee 32
>>> 37073 Göttingen
>>>
>>> Tel: +49 (0)551 39-10710
>>> Fax: +49 (0)551 39-4995
>>>
>>> http://www.ams.med.uni-goettingen.de/amsneu/leha.html
>>>
>>>
>>>
>>> University Medical Center Göttingen
>>> Department for Medical Statistics
>>> Humboldtallee 32
>>> 37073 Göttingen
>>> Germany
>>>
>>> Phone: +49 (0) 551 39-10710
>>> Fax: +49 (0) 551 39-4995
>>>
>>> http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html
>>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 15525 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-12-08 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 17:38 source code block export no expansion Andreas Leha
2010-12-07 18:37 ` Thomas S. Dye
2010-12-07 18:49   ` Andreas Leha
2010-12-07 19:33     ` Thomas S. Dye
2010-12-07 19:46       ` Andreas Leha
2010-12-07 20:14         ` Thomas S. Dye
2010-12-08  6:55           ` Andreas Leha
2010-12-08 16:49             ` Thomas S. Dye

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.