From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: source code block export no expansion Date: Wed, 8 Dec 2010 06:49:55 -1000 Message-ID: <1DE4DEF3-881D-480B-85C2-2E9453D2DCC1@tsdye.com> References: <4CFE7126.8090304@med.uni-goettingen.de> <2062CE38-02AE-48AE-A36E-92605E973FCB@tsdye.com> <4CFE81C7.8090402@med.uni-goettingen.de> <4CFE8F08.4030207@med.uni-goettingen.de> <7587B29A-EF63-4FAD-BBDD-A59FFEA769D9@tsdye.com> <4CFF2BCF.4030400@med.uni-goettingen.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1388921791==" Return-path: Received: from [140.186.70.92] (port=58198 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQNDv-0001Qu-8n for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 11:50:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQNDt-0004pF-8K for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 11:50:35 -0500 Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:39672) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PQNDs-0004oL-50 for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 11:50:33 -0500 In-Reply-To: <4CFF2BCF.4030400@med.uni-goettingen.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org --===============1388921791== Content-Type: multipart/alternative; boundary=Apple-Mail-14--12816616 --Apple-Mail-14--12816616 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Hi Andreas, I've put a bug report on Eric and Dan's stack. Thanks again for =20 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 =20= > my limits. > > But for me the unnamed session is a valid work-around for me, since =20= > 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 =20 >> qualify as a bug. Using your code, if I don't run R in a session, =20= >> or if I run R in a session but don't name the session, everything =20 >> works as expected. The behavior changes for me when the session =20 >> 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 =20= >>> with the typo corrected during export the noweb links are still =20 >>> 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* >>> <> >>> <> >>> #+end_src >>> >>> Result: >>> ... >>> \lstset{language=3DR} >>> \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 =20 >>>>> as :noweb yes, >>>>> which is why I missed that option. >>>> >>>> I believe this is fixed at the source now, but am not sure how =20 >>>> 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* >>>>> <> >>>>> <> >>>>> #+end_src >>>>> >>>>> >>>> >>>> Perhaps this has to do with using :export instead of the correct =20= >>>> 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 =20 >>>>> tangle >>>>> header option is supposed to disable the expansion also for =20 >>>>> *execution*. >>>> >>>> This isn't how it works for me. :noweb tangle inhibits noweb =20 >>>> expansion during export only. >>>> >>>>> >>>>> So, is this not possible right now? >>>>> >>>> >>>> It is possible now. If the :exports header argument doesn't fix =20= >>>> 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 =20= >>>>>>> have >>>>>>> several modules (mod1, mod2), that build a bigger part (part1) =20= >>>>>>> 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* >>>>>>> <> >>>>>>> <> >>>>>>> #+end_src >>>>>>> >>>>>>> >>>>>>> Now during the tangling I would like to tangle just the full =20 >>>>>>> part1 - >>>>>>> with noweb links being expanded. Also during execution the =20 >>>>>>> noweb links >>>>>>> should be expanded. This is not a problem. >>>>>>> >>>>>>> But at the same time, during the export I'd like to export all =20= >>>>>>> three >>>>>>> code snippets, but I'd prefer the noweb links not to be =20 >>>>>>> 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 >>>>> >>>>> --=20 >>>>> Andreas Leha >>>>> >>>>> Universit=E4tsmedizin G=F6ttingen >>>>> Abteilung Medizinische Statistik >>>>> Humboldtallee 32 >>>>> 37073 G=F6ttingen >>>>> >>>>> 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=F6ttingen >>>>> Department for Medical Statistics >>>>> Humboldtallee 32 >>>>> 37073 G=F6ttingen >>>>> 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 >>>> >>> >>> --=20 >>> Andreas Leha >>> >>> Universit=E4tsmedizin G=F6ttingen >>> Abteilung Medizinische Statistik >>> Humboldtallee 32 >>> 37073 G=F6ttingen >>> >>> 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=F6ttingen >>> Department for Medical Statistics >>> Humboldtallee 32 >>> 37073 G=F6ttingen >>> 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 --Apple-Mail-14--12816616 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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=3DR}
= \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&nb= sp;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=E4tsmedizin = G=F6ttingen
Abteilung Medizinische Statistik
Humboldtallee = 32
37073 G=F6ttingen

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=F6ttingen
Department = for Medical Statistics
Humboldtallee 32
37073 G=F6ttingen
= Germany

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

http://w= ww.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
=


=
--=20
Andreas Leha

Universit=E4tsmedizin G=F6ttingen
Abteilung Medizinische Statistik
Humboldtallee 32
37073 G=F6ttingen

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=F6ttingen
Department for Medical Statistics
Humboldtallee 32
37073 G=F6ttingen
Germany

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

http://w=
ww.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

= --Apple-Mail-14--12816616-- --===============1388921791== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1388921791==--