emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] [babel] `org-babel-tangle-w-comments' controls comment ins


From: Thomas S. Dye
Subject: Re: [Orgmode] [babel] `org-babel-tangle-w-comments' controls comment insertion in tangled code
Date: Fri, 28 May 2010 09:17:51 -1000

Hi Erik,

I am *not* a programmer so expect considerable chaff for every kernel of wheat (no wheat guaranteed).

I would pass the function an org-mode link then write out the contents pointed at by the link inside a named code block, with each line preceded by an optional comment character. If this were written in a general way, then it would be possible to include comments from any link--on-line manuals, standards, blogs, etc.--in addition to notes in the org-mode file.

If it were written in a very general way, with a transformation function responsible for adding the comment character, then a variety of transformations might be possible.

I've followed the list long enough to recognize that musings like mine are often met by the response that org-mode already does this. For all I know, it does!

All the best,
Tom

On May 28, 2010, at 8:41 AM, Erik Iverson wrote:



Thomas S. Dye wrote:
Hi Erik,
If the proposed functionality places comments in the source code in whatever order they appear in the org-mode file, then the result will likely frustrate literate programming efforts that rearrange code blocks on tangling.

Yes, thank you for pointing that out.

Another way to get pieces of the org-mode file into the source file as comments might be with a little helper function, org-babel-copy- subtree-to-commented-code. The source blocks could be named so the literate programming facilities of org-babel could work with them.

I'm not following this; could you provide a minimal pseudo-example of how you see this working in practice?

Thanks!
Erik




reply via email to

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