Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-16 Thread Berry, Charles
Hi Greg, > On Apr 16, 2021, at 8:27 AM, Greg Minshall wrote: > > Rama, > > one other comment/suggestion. > >> I haven’t been able to fully work with Donald Knuth’s suggestion of >> writing a Literate Program directly in a tool like orgmode/noweb since >> it is a nuisance to keep having to type

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-16 Thread Greg Minshall
Rama, one other comment/suggestion. > I haven’t been able to fully work with Donald Knuth’s suggestion of > writing a Literate Program directly in a tool like orgmode/noweb since > it is a nuisance to keep having to type C-c ' to go into the editing > mode of the language concerned. while i have

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-13 Thread Greg Minshall
Rama, thanks for your explanation. Arne Babenhauserheide suggested [M-x org-babel-detangle]; i've not used it myself, but it seems a possible direction. cheers, Greg

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-13 Thread Dr. Arne Babenhauserheide
Rama writes: > Ultimately I have just decided that I will develop my code as normal and then > finally just copy and paste it into orgmode especially since now we can > select a region and and create a source block around it. Do you know M-x insert-file? That could simplify your workfloww a lo

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-13 Thread Rama
Thank you, Greg, this is certainly a logical suggestion, but I didn’t explain why I would have these blocks in individual files - I will explain very quickly here. Basically I am developing my Lisp code using the ASDF package manager and so I have a few different files in a source tree. I haven

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-13 Thread Greg Minshall
Rama, another possible solution, though it may not be possible for your setup, is to "invert" things: centralize all your snippets in snippet.org, with each *snippet* set to tangle to its individual lisp file. cheers, Greg

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-13 Thread Kevin M. Stout
On 2021-04-12 23:38, Nicolas Goaziou wrote: > However, you may try calling `org-export-expand-include-keyword' from > `org-babel-pre-tangle-hook'. Untested. I've done this in the past and can verify that it works well. That said, it by definition creates cross-talk between org files, with all th

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-13 Thread Timothy
Nicolas Goaziou writes: > #+include is a keyword specific to export. I doubt it would work with > tangling out of the box. > > However, you may try calling `org-export-expand-include-keyword' from > `org-babel-pre-tangle-hook'. Untested. Doom has been doing this for a while with config.org tan

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-12 Thread Dr. Arne Babenhauserheide
Nicolas Goaziou writes: > Hello, > > Ramachandran Lakshmanan writes: > >> I have been wanting to include a number of small Common Lisp snippets in >> individual files which I then include into a "master" .org file using: >> >> #+include: "snippet.org" src lisp >> >> Within snippet.org I have a

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-12 Thread Nicolas Goaziou
Hello, Ramachandran Lakshmanan writes: > I have been wanting to include a number of small Common Lisp snippets in > individual files which I then include into a "master" .org file using: > > #+include: "snippet.org" src lisp > > Within snippet.org I have a src block such as: > [...] > I read s

Is it possible to #+include: src blocks and tangle them too?

2021-04-12 Thread Ramachandran Lakshmanan
I have been wanting to include a number of small Common Lisp snippets in individual files which I then include into a "master" .org file using: #+include: "snippet.org" src lisp Within snippet.org I have a src block such as: #+NAME: hello_test #+BEGIN_SRC lisp :tangle yes (defun hello () :hello)