emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rama <rama@tzrl.org>
To: Greg Minshall <minshall@umich.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Is it possible to #+include: src blocks and tangle them too?
Date: Wed, 14 Apr 2021 04:48:05 +0100	[thread overview]
Message-ID: <c0529acc-f422-4955-9ca6-cd4a56af118c@Canary> (raw)
In-Reply-To: <118250.1618370593@apollo2.minshall.org>

[-- Attachment #1: Type: text/plain, Size: 3035 bytes --]

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’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.

I also tend to use a mindmapping tool (MindNode on my Mac in my case) since with some specific genetic mental issues I do better with a visual outline than the standard ones even the flexible offering in orgmode itself. I’m fine once I’ve done the brainstorming, and I then will export to OPML and use Pandoc to get an orgmode file.

But what I wanted to do was to insert Javadoc style comments into my Lisp in my original code and I would label each entry with the name of the source code block which also gets named <name>.org in a flat folder.

For example

;;; metrics_graph
;;; ——
;;; Textual essay paragraphs
;;; ——
(defun nothing () nil)

The above is in metrics_graph.org (http://metrics_graph.org)

All these generated files are styled as a very simple markdown file so that I can read this into MindNode and have a bunch of nodes named with the names of the org snippets as I have called them (confusingly as "snippet" has a different connotation most often).

With these mechanics I can write my Lisp code as I have done for years but I can also have it easily translated into a set of Nodes in MindNode that I can move around graphically with a mouse and create my Literate Program.

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.

So taking a Lisp file and formatting it for orgmode is not a huge burden - then I will be able to tangle it and I will just then continue to work from the org file if I need to edit and debug the code later on. It just means I will take the code to near completion before trying to work with a Literate Program but I do hope to start using Babel for documenting my work even though I am no longer working in a research setting per se.

Thanks to all for your suggestions - Doom seems a reasonable option - but I will try them all as best I can - I am on my second all nighter though so need some sleep first!



Sent from Canary (https://canarymail.io)

> On Wednesday, Apr 14, 2021 at 4:23 am, Greg Minshall <minshall@umich.edu (mailto:minshall@umich.edu)> wrote:
> 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

[-- Attachment #2: Type: text/html, Size: 4166 bytes --]

  reply	other threads:[~2021-04-14  3:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 15:35 Ramachandran Lakshmanan
2021-04-12 21:38 ` Nicolas Goaziou
2021-04-13  6:31   ` Dr. Arne Babenhauserheide
2021-04-13  6:59   ` Timothy
2021-04-14  0:26   ` Kevin M. Stout
2021-04-14  3:23 ` Greg Minshall
2021-04-14  3:48   ` Rama [this message]
2021-04-14  6:33     ` Dr. Arne Babenhauserheide
2021-04-14  6:52     ` Greg Minshall
2021-04-16 15:27     ` Greg Minshall
2021-04-16 21:14       ` Berry, Charles via General discussions about Org-mode.

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:

  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=c0529acc-f422-4955-9ca6-cd4a56af118c@Canary \
    --to=rama@tzrl.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=minshall@umich.edu \
    --subject='Re: Is it possible to #+include: src blocks and tangle them too?' \


* 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:


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).