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

2021-07-09 Thread Tim Cross
On Fri, 9 Jul 2021 at 22:28, Vladimir Lomov wrote: > Hello, > ** Greg Minshall [2021-07-07 09:56:06 +0300]: > > > Vladimir, > > >> I couldn't find in Org manual how tangling should work if there are > >> several source code blocks with the same file name for ':tangle'. The > >> Org manual sectio

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

2021-07-09 Thread Jacopo De Simoi
‐‐‐ Original Message ‐‐‐ On Friday, July 9th, 2021 at 8:26 AM, Vladimir Lomov wrote: > Hello, > > ** Greg Minshall minsh...@umich.edu [2021-07-07 09:56:06 +0300]: > > > Vladimir, > > > > I couldn't find in Org manual how tangling should work if there are > > > > > > several source cod

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

2021-07-09 Thread Vladimir Lomov
Hello, ** Greg Minshall [2021-07-07 09:56:06 +0300]: > Vladimir, >> I couldn't find in Org manual how tangling should work if there are >> several source code blocks with the same file name for ':tangle'. The >> Org manual section "15.8 Extracting Source Code" is a bit >> obscure. There are thes

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

2021-07-08 Thread Jacopo De Simoi
Hi Doctor, It's good to have such constructive discussion here. I like your approach to tangle based on tags. I accomplish more or less the same in this (unfinished) literate config for zshrc https://gist.github.com/85c9b9c9ab151c5fd35bd761ef6ef569 Here the function `org-tags-to-filenames' s

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

2021-07-08 Thread Trust me I am a Doctor
Hi, I have no particular opinion for the patch proposed but wanted to share with you some reflections I had on the subject to use one org file to tangle to multiple setup. I use abundantly virtual machines and my emacs configurations have many bits that I don't want everywhere, be it a mail setu

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

2021-07-07 Thread Tom Gillespie
Reading over this with the new information about the use case, it seems that using noweb to manage the many-to-many nature of a mapping between blocks and files is a much better way to achieve the desired result. In addition it is already supported and does not add more complexity to an already com

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

2021-07-07 Thread Jacopo De Simoi
‐‐‐ Original Message ‐‐‐ On Wednesday, July 7th, 2021 at 7:28 PM, Tim Cross wrote: > Jacopo De Simoi jacop...@protonmail.com writes: > > > In fact the files are different, since each source block is tangled to a > > > > possibly different subset of files. > > > > The logic for which

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

2021-07-07 Thread Tim Cross
Jacopo De Simoi writes: > > In fact the files are different, since each source block is tangled to a > possibly different subset of files. > > The logic for which files to tangle according to which parameter or tags can > be > implemented by some lisp magic such as > > #+begin_src sh :tang

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

2021-07-07 Thread General discussions about Org-mode.
Dear Tim, On Tuesday, July 6, 2021 3:30:40 AM EDT Tim Cross wrote: > Jacopo De Simoi via "General discussions about Org-mode." writes: > > Hi Greg, > > > > thanks for your comments! > > > > On Tuesday, July 6, 2021 12:43:54 AM EDT Greg Minshall wrote: > >> hi, Jacopo, > >> > >> i'm not convin

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

2021-07-07 Thread Jacopo De Simoi
Dear Greg, Thanks for bringing this up Original Message On Jul. 7, 2021, 02:56, Greg Minshall < minsh...@umich.edu> wrote: Vladimir, > I couldn't find in Org manual how tangling should work if there are > several source code blocks with the same file name for ':tangle'. The > Or

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

2021-07-06 Thread Greg Minshall
Vladimir, > I couldn't find in Org manual how tangling should work if there are > several source code blocks with the same file name for ':tangle'. The > Org manual section "15.8 Extracting Source Code" is a bit > obscure. There are these two sentences i think what Tim answered is correct. but,

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

2021-07-06 Thread Jacopo De Simoi
On Tuesday, July 6, 2021 11:27:18 PM EDT Vladimir Lomov wrote: > Hello Jacopo. > > ** Jacopo De Simoi [2021-07-06 11:24:40 -0400]: > > Dear Vladimir, > > > > thanks for your reply. > > > > Let me show you two examples; they are both WIP and incomplete, but you'll > > get the gist. > > > > - Examp

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

2021-07-06 Thread Tim Cross
Vladimir Lomov writes: > [[PGP Signed Part:Undecided]] > Hello Jacopo. > ** Jacopo De Simoi [2021-07-06 11:24:40 -0400]: > >> Dear Vladimir, > >> thanks for your reply. > >> Let me show you two examples; they are both WIP and incomplete, but you'll >> get >> the gist. > >> - Example 1 > >

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

2021-07-06 Thread Vladimir Lomov
Hello Jacopo. ** Jacopo De Simoi [2021-07-06 11:24:40 -0400]: > Dear Vladimir, > thanks for your reply. > Let me show you two examples; they are both WIP and incomplete, but you'll > get > the gist. > - Example 1 > https://gist.github.com/85c9b9c9ab151c5fd35bd761ef6ef569 > This is my li

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

2021-07-06 Thread General discussions about Org-mode.
Dear Vladimir, thanks for your reply. Let me show you two examples; they are both WIP and incomplete, but you'll get the gist. - Example 1 https://gist.github.com/85c9b9c9ab151c5fd35bd761ef6ef569 This is my literate config for .zshrc; as you can see different blocks are tangled to differe

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

2021-07-06 Thread Tim Cross
Jacopo De Simoi via "General discussions about Org-mode." writes: > Hi Greg, > > thanks for your comments! > > On Tuesday, July 6, 2021 12:43:54 AM EDT Greg Minshall wrote: >> hi, Jacopo, >> >> i'm not convinced this is needed over and above your old "solution" of >> using <> witn N-differen

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

2021-07-05 Thread Vladimir Lomov
Hello! ** Jacopo De Simoi via General discussions about Org-mode. [2021-07-06 01:09:30 -0400]: > Hi Greg, > thanks for your comments! > On Tuesday, July 6, 2021 12:43:54 AM EDT Greg Minshall wrote: >> hi, Jacopo, >> >> i'm not convinced this is needed over and above your old "solution" of >>

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

2021-07-05 Thread General discussions about Org-mode.
Hi Greg, thanks for your comments! On Tuesday, July 6, 2021 12:43:54 AM EDT Greg Minshall wrote: > hi, Jacopo, > > i'm not convinced this is needed over and above your old "solution" of > using <> witn N-different source blocks, each :tangle'ing to a > different file. To be honest I never quit

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

2021-07-05 Thread Greg Minshall
hi, Jacopo, i'm not convinced this is needed over and above your old "solution" of using <> witn N-different source blocks, each :tangle'ing to a different file. but, i'm curious -- in the example you sent, did you miss a ":tangle" on the "#+begin_src" line? > #+begin_src sh '("filename1" "filen

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

2021-07-05 Thread Vladimir Lomov
Hello ** Jacopo De Simoi [2021-07-05 18:54:14 +]: > 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 t

[PATCH] Allow tangling to a list of files

2021-07-05 Thread Jacopo De Simoi
Dear All, 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 Usecases - literate config (e.g. .zshrc) of several machines at onc