emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: Erik Iverson <eriki@ccbr.umn.edu>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [babel] `org-babel-tangle-w-comments' controls comment insertion in tangled code
Date: Fri, 28 May 2010 09:17:51 -1000	[thread overview]
Message-ID: <01CF33E6-A706-47A7-9F85-572AE28EB180@tsdye.com> (raw)
In-Reply-To: <4C000E44.9050307@ccbr.umn.edu>

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	other threads:[~2010-05-28 19:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28 14:55 [babel] `org-babel-tangle-w-comments' controls comment insertion in tangled code Eric Schulte
2010-05-28 15:43 ` Erik Iverson
2010-05-28 15:47   ` Erik Iverson
2010-05-28 15:57   ` Eric Schulte
2010-05-28 16:24     ` Erik Iverson
2010-05-28 18:08       ` Thomas S. Dye
2010-05-28 18:41         ` Erik Iverson
2010-05-28 19:17           ` Thomas S. Dye [this message]
2010-06-17  3:57             ` Eric Schulte

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=01CF33E6-A706-47A7-9F85-572AE28EB180@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eriki@ccbr.umn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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