emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: "Berry, Charles" <ccberry@health.ucsd.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: tangling from multiple files
Date: Sat, 04 Apr 2020 15:08:42 -0300	[thread overview]
Message-ID: <871rp32ket.fsf@tethera.net> (raw)
In-Reply-To: <9C56E5CA-F558-473E-AC56-9B4278C79344@health.ucsd.edu>

"Berry, Charles" <ccberry@health.ucsd.edu> writes:

> Oops. Correction below.
>
>> On Mar 18, 2020, at 7:38 PM, Berry, Charles <ccberry@health.ucsd.edu> wrote:
>> 
>> 
>> Right. It does not work directly for tangling. So also use 
>> 
>> #+export_file_name: b2.org
>> 
>> (say)
>> 
>> Then load ox-ob.el,
>
> load ox-org.el, rather.
>
>> export as C-c C-e O o (org-org-export-to-org),  visit b2.org and tangle from there. 

I finally got around to trying this. In a broad sense it works, but
(at least with default settings) it loses the keywords on individual
source blocks.

if a.org looks like

#+include: c.org
#+export_file_name: foo.org
#+begin_src python :tangle foo.py :noweb true
<<test.py>>
    def hello():
        test()
#+end_src

then foo.org looks like

# Created 2020-04-04 Sat 15:03
#+TITLE: 
#+AUTHOR: David Bremner
#+name test.py
#+begin_src python
  def test:
      print("test")
#+end_src
#+export_file_name: foo.org
#+begin_src python
  <<test.py>>
      def hello():
          test()
#+end_src

Since my org files all tangle to multiple source files, this doesn't
really work for me.  I guess I could have a single wrapper file for each
file I want to tangle to, but I have other keywords e.g. :shebang, whose
loss will still break things.

d






  reply	other threads:[~2020-04-04 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17 23:21 David Bremner
2020-03-18 22:10 ` Berry, Charles via General discussions about Org-mode.
2020-03-19  1:29   ` David Bremner
2020-03-19  2:38     ` Berry, Charles via General discussions about Org-mode.
2020-03-19 17:40       ` Berry, Charles via General discussions about Org-mode.
2020-04-04 18:08         ` David Bremner [this message]
2020-04-05 17:56           ` Berry, Charles via General discussions about Org-mode.
2020-04-08 17:14             ` David Bremner

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 \
    --in-reply-to=871rp32ket.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=ccberry@health.ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: tangling from multiple files' \
    /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).