From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] `org-babel-tangle-w-comments' controls comment insertion in tangled code Date: Wed, 16 Jun 2010 20:57:47 -0700 Message-ID: <87aaqunwec.fsf@gmail.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> <01CF33E6-A706-47A7-9F85-572AE28EB180@tsdye.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=56820 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OP6Em-0007bL-32 for emacs-orgmode@gnu.org; Wed, 16 Jun 2010 23:57:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OP6Ej-0007as-85 for emacs-orgmode@gnu.org; Wed, 16 Jun 2010 23:57:55 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:55259) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OP6Ej-0007ad-3m for emacs-orgmode@gnu.org; Wed, 16 Jun 2010 23:57:53 -0400 Received: by pwi7 with SMTP id 7so9602421pwi.0 for ; Wed, 16 Jun 2010 20:57:51 -0700 (PDT) In-Reply-To: <01CF33E6-A706-47A7-9F85-572AE28EB180@tsdye.com> (Thomas S. Dye's message of "Fri, 28 May 2010 09:17:51 -1000") 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: "Thomas S. Dye" Cc: Org Mode Just to make sure we don't lose these idea, I've posed them up in the babel dev repo http://eschulte.github.com/babel-dev/PROPOSED-tangle-entire-org-mode-file-in-comments.html Best -- Eric "Thomas S. Dye" writes: > 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