From mboxrd@z Thu Jan 1 00:00:00 1970 From: MidLifeXis at PerlMonks Subject: Re: Regression bug in tangle/weave Date: Tue, 5 Jul 2011 05:56:48 -0700 (PDT) Message-ID: <1309870608.34118.YahooMailNeo@web81603.mail.mud.yahoo.com> References: <1309447445.43453.YahooMailNeo@web81602.mail.mud.yahoo.com> <8762nn8945.fsf@gmail.com> <1309524709.92777.YahooMailNeo@web81607.mail.mud.yahoo.com> <871uy9n4i1.fsf@gmail.com> <1309552851.63113.YahooMailNeo@web81604.mail.mud.yahoo.com> Reply-To: MidLifeXis at PerlMonks Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe5BO-0003Nz-3j for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 08:56:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe5BL-0000gX-V3 for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 08:56:53 -0400 Received: from nm12-vm0.access.bullet.mail.mud.yahoo.com ([66.94.236.11]:46142) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qe5BL-0000gF-Hl for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 08:56:51 -0400 In-Reply-To: <1309552851.63113.YahooMailNeo@web81604.mail.mud.yahoo.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode I tested this again over the weekend, and finally understood what you were = saying.=0A=0AI put a=0A=0A#+resname: blah=0A: blahcontent=0A=0Aand then I c= an use <> to get "blahcontent" replaced without keeping the newline= s.=0A=0AIs this "abusing" resname, or is it a proper use of the keyword?=A0= Will this behavior be stable in the future?=0A=0ABrian=0A=0A=0A=0A----- Or= iginal Message -----=0AFrom: MidLifeXis at PerlMonks =0ATo: Eric Schulte =0ACc: emacs-orgmode =0ASent: Friday, July 1, 2011 3:40 PM=0ASubject: Re: [O]= Regression bug in tangle/weave=0A=0AI am still getting prompted with the '= Evaluate this text code block (file-version) on your system?' message.=0A= =0AWhat is your value of org-confirm-babel-evaluate set to?=A0 Mine is set = as the default, 't.=A0 According to the docs, this is the more secure setti= ng.=0A=0A=0AI updated no more than two weeks ago.=A0 I will refresh my org-= mode setup over the weekend and see if that takes care of it.=0A=0ABrian=0A= =0A=0A=0A----- Original Message -----=0AFrom: Eric Schulte =0ATo: MidLifeXis at PerlMonks =0ACc: e= macs-orgmode =0ASent: Friday, July 1, 2011 2:14 PM= =0ASubject: Re: [O] Regression bug in tangle/weave=0A=0AYes, the second exa= mple I gave (shown immediately below) requires no=0Aexecution of code.=0A= =0A=A0 =A0 #+begin_src text :tangle yes=0A=A0 =A0 =A0 <>.= =0A=A0 =A0 #+end_src=0A=0A=A0 =A0 #+results: file-version=0A=A0 =A0 : 1.2.3= .4=0A=0ABest -- Eric=0A=0AMidLifeXis at PerlMonks writes:=0A=0A> Is there an example of this that does not use something = like elisp, R, perl, python, shell, or some other process that requires eit= her allowing all blocks to execute without prompting, or prompting for auth= ority to run the block every time the file is tangled?=0A>=0A> Brian=0A>=0A= >=0A>=0A> ----- Original Message -----=0A> From: Eric Schulte =0A> To: MidLifeXis at PerlMonks =0A= > Cc: emacs-orgmode =0A> Sent: Thursday, June 30, 20= 11 1:30 PM=0A> Subject: Re: [O] Regression bug in tangle/weave=0A>=0A> Hi,= =0A>=0A> Indeed this example below no longer works, however I believe the n= ew=0A> behavior is both desired and permanent.=A0 I'll explain and include = an=0A> option for how your example could be restructured to work with the n= ew=0A> code.=0A>=0A> We ran into problems automatically removing trailing n= ewlines from code=0A> block bodies as in some languages (looking at you Pyt= hon and Haskell)=0A> things like trailing newlines are of syntactic importa= nce.=A0 In your=0A> example this behavior results in the insertion of newli= nes after=0A> file-name and file-version.=A0 Babel is careful to preserve l= ine prefixes=0A> when expanding references in comments, so it then reproduc= es the=0A>=0A> =A0 # Generated from =0A>=0A> portion of that line for every= line of the expanded noweb references.=0A>=0A> I would suggest the followi= ng alternatives, either using a data=0A> references in stead of a code bloc= k reference as in the file-version=0A> example below, or using an evaluated= code block as in the file-name=0A> example below.=A0 Hope this helps.=0A>= =0A> Best -- Eric=0A>=0A>=0A>=0A> MidLifeXis at PerlMonks writes:=0A>=0A>> It appears that there may be a regression prob= lem with the current=0A>> tangle/weave process.=A0 I used to be able to hav= e a noweb section for=0A>> the name of the file, another for the version of= the file, and then=0A>> have an autogenerated header section that included= those two pieces of=0A>> information on a single line.=A0 Following is an = org file snippet of my=0A>> bug description.=0A>>=0A>>=0A>> * Bugs=0A>> ** = SOMEDAY org-mode bug with tangle and newlines=A0=A0=A0=A0=A0 :BUG:=0A>> =A0= =A0 :PROPERTIES:=0A>> =A0=A0 :created: [2011-06-30 Thu 10:00]=0A>> =A0=A0 := ID: e4c992b5-4d35-443b-b34a-0fbda7c66aea=0A>> =A0=A0 :END:=0A>> =A0=A0 :LOG= BOOK:=0A>> =A0=A0 - Added on [2011-06-30 Thu 10:00]=0A>> =A0=A0 :END:=0A>> = =A0=A0 [2011-06-30 Thu]=0A>>=0A>> =A0=A0 A regression bug has surfaced in o= rg-mode with the tangle/weave=0A>> =A0=A0 process mangling the following se= tup:=0A>>=0A>> =A0=A0 #+begin_src perl :noweb yes :tangle testoutput.pl :sh= ebang #!perl=0A>> =A0=A0 # <>=0A>> =A0=A0 print "Hello worl= d\n";=0A>> =A0=A0 #+end_src=0A>>=0A>> =A0=A0 #+srcname: generated-from=0A>>= =A0=A0 #+begin_src text :noweb yes=0A>> =A0=A0 Generated from <= > version <>.=0A>> =A0=A0 #+end_src=0A>>=0A>> =A0=A0 #+srcnam= e: file-name=0A>> =A0=A0 #+begin_src text :noweb yes=0A>> =A0=A0 ATestFile.= org=0A>> =A0=A0 #+end_src=0A>>=0A>> =A0=A0 #+srcname: file-version=0A>> =A0= =A0 #+begin_src text :noweb yes=0A>> =A0=A0 1.2.3.4=0A>> =A0=A0 #+end_src= =0A>>=0A>> =A0=A0 The last it worked* was sometime in the early 7.4 timefra= me.=A0 If I=0A>> =A0=A0 get some time, I may do a bisect on it, although ot= hers are welcome=0A>> =A0=A0 to do the work required.=A0 Timeframe is based= on memory, not=0A>> =A0=A0 actual checking, so first a bisect needs to be = done to find where=0A>> =A0=A0 it last worked.=0A>>=0A>>=0A>> *** Actual ou= tput=0A>>=0A>> #+begin_src perl=0A>> #!perl=0A>>=0A>> # Generated from ATes= tFile.org=0A>> # Generated from version 1.2.3.4=0A>> # Generated from <> version .=0A>> # =0A>> print "Hello world\n";=0A>> #+end_src=0A>>= =0A>> *** Expected output (or at least similar)=0A>>=0A>> #+begin_src perl= =0A>> #!perl=0A>>=0A>> # Generated from ATestFile.org version 1.2.3.4.=0A>>= =0A>> print "Hello world\n";=0A>> #+end_src=0A>>=0A>> * End of org file=0A>= >=0A>>=0A=0A-- =0AEric Schulte=0Ahttp://cs.unm.edu/~eschulte/=0A