From mboxrd@z Thu Jan 1 00:00:00 1970 From: MidLifeXis at PerlMonks Subject: Re: Regression bug in tangle/weave Date: Fri, 1 Jul 2011 13:40:51 -0700 (PDT) Message-ID: <1309552851.63113.YahooMailNeo@web81604.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> 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]:34686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QckWH-0005DL-DE for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 16:40:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QckWE-0004gL-Os for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 16:40:56 -0400 Received: from nm4-vm0.access.bullet.mail.mud.yahoo.com ([66.94.237.138]:21748) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QckWE-0004fy-6g for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 16:40:54 -0400 In-Reply-To: <871uy9n4i1.fsf@gmail.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 am still getting prompted with the 'Evaluate this text code block (file-v= ersion) on your system?' message.=0A=0AWhat is your value of org-confirm-ba= bel-evaluate set to?=A0 Mine is set as the default, 't.=A0 According to the= docs, this is the more secure setting.=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 PerlMonk= s =0ACc: emacs-orgmode = =0ASent: Friday, July 1, 2011 2:14 PM=0ASubject: Re: [O] Regression bug in = tangle/weave=0A=0AYes, the second example 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 #+resul= ts: file-version=0A=A0 =A0 : 1.2.3.4=0A=0ABest -- Eric=0A=0AMidLifeXis at P= erlMonks writes:=0A=0A> Is there an example of= this that does not use something like elisp, R, perl, python, shell, or so= me other process that requires either allowing all blocks to execute withou= t prompting, or prompting for authority to run the block every time the fil= e is tangled?=0A>=0A> Brian=0A>=0A>=0A>=0A> ----- Original Message -----=0A= > From: Eric Schulte =0A> To: MidLifeXis at PerlMon= ks =0A> Cc: emacs-orgmode =0A> Sent: Thursday, June 30, 2011 1:30 PM=0A> Subject: Re: [O] Regressio= n bug in tangle/weave=0A>=0A> Hi,=0A>=0A> Indeed this example below no long= er works, however I believe the new=0A> behavior is both desired and perman= ent.=A0 I'll explain and include an=0A> option for how your example could b= e restructured to work with the new=0A> code.=0A>=0A> We ran into problems = automatically removing trailing newlines from code=0A> block bodies as in s= ome languages (looking at you Python and Haskell)=0A> things like trailing = newlines are of syntactic importance.=A0 In your=0A> example this behavior = results in the insertion of newlines after=0A> file-name and file-version.= =A0 Babel is careful to preserve line prefixes=0A> when expanding reference= s in comments, so it then reproduces 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 following alternatives, either using a data=0A= > references in stead of a code block reference as in the file-version=0A> = example below, or using an evaluated code block as in the file-name=0A> exa= mple below.=A0 Hope this helps.=0A>=0A> Best -- Eric=0A>=0A>=0A>=0A> MidLif= eXis at PerlMonks writes:=0A>=0A>> It appears = that there may be a regression problem with the current=0A>> tangle/weave p= rocess.=A0 I used to be able to have a noweb section for=0A>> the name of t= he file, another for the version of the file, and then=0A>> have an autogen= erated 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 descript= ion.=0A>>=0A>>=0A>> * Bugs=0A>> ** SOMEDAY org-mode bug with tangle and new= lines=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 :LOGBOOK:=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 org-mode with the tangle/weave=0A>> =A0= =A0 process mangling the following setup:=0A>>=0A>> =A0=A0 #+begin_src perl= :noweb yes :tangle testoutput.pl :shebang #!perl=0A>> =A0=A0 # <>=0A>> =A0=A0 print "Hello world\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 #+srcname: 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 timeframe.=A0 If I=0A>> =A0=A0 get some time,= I may do a bisect on it, although others are welcome=0A>> =A0=A0 to do the= work required.=A0 Timeframe is based on memory, not=0A>> =A0=A0 actual che= cking, so first a bisect needs to be done to find where=0A>> =A0=A0 it last= worked.=0A>>=0A>>=0A>> *** Actual output=0A>>=0A>> #+begin_src perl=0A>> #= !perl=0A>>=0A>> # Generated from ATestFile.org=0A>> # Generated from versio= n 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/