emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Allow tangling to a list of files


From: Vladimir Lomov
Subject: Re: [PATCH] Allow tangling to a list of files
Date: Tue, 6 Jul 2021 10:57:31 +0800

Hello
** Jacopo De Simoi <wilderjds@protonmail.com> [2021-07-05 18:54:14 +0000]:

> Dear All,

I do use 'tangle' feature and I have several Org documents that tangle shell
scripts as well as shell configurations so I could comment your proposal a
bit.

> Please find attached a patch (against master) that adds a feature to the
> tangle framework. Essentially, the following block would now tangle to two
> files

> #+begin_src sh '("filename1" "filename2")
> #my script
> #+end_src

May be you mean

#+begin_src sh :tangle '("filename1" "filemane2")
# some shell script
#+end_src

> Usecases

> - literate config (e.g. .zshrc) of several machines at once (e.g. tangling
> via tramp).

IMO this is very specific use case but still it could be solved using existing
technique. I would suggest storing all configuration files (as well as Org
documents) in git repository, tangle them on a host, push to a repository and
pull them on destination host (I do this myself, it helps me to avoid errors).

> - literate similar versions of the same script which differ only in small
> chunks (I use it for a slightly different latexmkrc for my projects on
> Dropbox)

Again, IMO, this is very specific use case. You could use standard way to get
desire result. Besides if you want tangle to several files they content will
be the same, won't it be? So you couldn't get different results from one code
block. I do a bit similar thing: I have Org document describing shell
configuration for several hosts. I tangle to different files using standard
technique and use 'noweb' feature to adapt to different hosts. 

May be it would worth if you describe what you want to achieve and how you are
doing it now?

[...]

---
WBR, Vladimir Lomov

-- 
Software suppliers are trying to make their software packages more
"user-friendly".  ...  Their best approach, so far, has been to take all
the old brochures, and stamp the words, "user-friendly" on the cover.
                -- Bill Gates, Microsoft, Inc.
        [Pot. Kettle. Black.]

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]