From: Nicolas Goaziou <firstname.lastname@example.org> To: email@example.com Cc: firstname.lastname@example.org Subject: Re: #+include from same file when exporting Date: Tue, 13 Oct 2020 21:51:53 +0200 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <firstname.lastname@example.org> (email@example.com's message of "Wed, 16 Sep 2020 01:14:30 +0000") Hello, firstname.lastname@example.org writes: > My comment for today is that I have something like this: > > this-file.org > .............................. > * Fancy header 1 > > #+NAME: blk1 > #+begin_src python > > import numpy as np #+end_src > > ** Fancy subheader 2 > > Res 1 > > #+include: "this-file.org::blk1" > > Res 2 > > #+include: "this-file.org::blk1" src python > > Res 3 > > #+include: "./this-file.org::blk1" src python > .............................. end [...] > I think that all of them should just export the python block, right? I don't think so. #+include: file src python means that file is really a python file, whose contents are going to be enclosed in a Python source code block. So Res 2 and Res 3 are not meaningful in that case; you cannot apply link search syntax to non-Org files. > Also, I think that it would be very useful to have something like this: > > another-file.org > .............................. > * Fancy header 1 > > #+NAME: blk1 > #+begin_src python :exports none > > print(2) #+end_src > > #+RESULTS: : 2 > > ** Fancy subheader 2 > > Res 1 > > #+include: "this-file.org::blk1" src python :exports both > .............................. end > > > Which would allow to have the =#+include= override the =:exports= > directive from the original block and get the results from the block. "Include" is an export-only directive, which is not the case of :exports. They live in two different worlds, and I think it is a good thing to keep them orthogonal. You may be looking after Babel calls. Regards, -- Nicolas Goaziou
prev parent reply other threads:[~2020-10-13 19:53 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-16 1:14 edgar 2020-10-13 19:51 ` Nicolas Goaziou [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: #+include from same file when exporting' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this 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).