From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: [babel] `org-babel-tangle-w-comments' controls comment insertion in tangled code Date: Fri, 28 May 2010 09:17:51 -1000 Message-ID: <01CF33E6-A706-47A7-9F85-572AE28EB180@tsdye.com> References: <87sk5c8497.fsf@gmail.com> <4BFFE4A7.9070300@ccbr.umn.edu> <878w746mul.fsf@gmail.com> <4BFFEE4F.5010608@ccbr.umn.edu> <88DCAA98-9A9A-4010-807F-2430121BAF22@tsdye.com> <4C000E44.9050307@ccbr.umn.edu> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38033 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI54A-0004SE-KV for emacs-orgmode@gnu.org; Fri, 28 May 2010 15:17:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI549-0006d5-K5 for emacs-orgmode@gnu.org; Fri, 28 May 2010 15:17:58 -0400 Received: from oproxy2-pub.bluehost.com ([67.222.39.60]:39781 helo=outbound-mail-360.bluehost.com) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OI548-0006cf-Sb for emacs-orgmode@gnu.org; Fri, 28 May 2010 15:17:57 -0400 In-Reply-To: <4C000E44.9050307@ccbr.umn.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Iverson Cc: Org Mode 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