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 05:51:49 -0700 (PDT) Message-ID: <1309524709.92777.YahooMailNeo@web81607.mail.mud.yahoo.com> References: <1309447445.43453.YahooMailNeo@web81602.mail.mud.yahoo.com> <8762nn8945.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]:43649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcdCM-0001iv-Bw for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 08:51:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcdCJ-0003Q7-NM for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 08:51:54 -0400 Received: from nm20-vm0.access.bullet.mail.mud.yahoo.com ([66.94.236.29]:22232) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QcdCJ-0003Pp-65 for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 08:51:51 -0400 In-Reply-To: <8762nn8945.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 Is there an example of this that does not use something like elisp, R, perl= , python, shell, or some other process that requires either allowing all bl= ocks to execute without prompting, or prompting for authority to run the bl= ock every time the file is tangled?=0A=0ABrian=0A=0A=0A=0A----- Original Me= ssage -----=0AFrom: Eric Schulte =0ATo: MidLifeXis = at PerlMonks =0ACc: emacs-orgmode =0ASent: Thursday, June 30, 2011 1:30 PM=0ASubject: Re: [O] Regre= ssion bug in tangle/weave=0A=0AHi,=0A=0AIndeed this example below no longer= works, however I believe the new=0Abehavior is both desired and permanent.= =A0 I'll explain and include an=0Aoption for how your example could be rest= ructured to work with the new=0Acode.=0A=0AWe ran into problems automatical= ly removing trailing newlines from code=0Ablock bodies as in some languages= (looking at you Python and Haskell)=0Athings like trailing newlines are of= syntactic importance.=A0 In your=0Aexample this behavior results in the in= sertion of newlines after=0Afile-name and file-version.=A0 Babel is careful= to preserve line prefixes=0Awhen expanding references in comments, so it t= hen reproduces the=0A=0A=A0 # Generated from =0A=0Aportion of that line for= every line of the expanded noweb references.=0A=0AI would suggest the foll= owing alternatives, either using a data=0Areferences in stead of a code blo= ck reference as in the file-version=0Aexample below, or using an evaluated = code block as in the file-name=0Aexample below.=A0 Hope this helps.=0A=0ABe= st -- Eric=0A=0A=0A=0AMidLifeXis at PerlMonks = writes:=0A=0A> It appears that there may be a regression problem with the c= urrent=0A> tangle/weave process.=A0 I used to be able to have a noweb secti= on for=0A> the name of the file, another for the version of the file, and t= hen=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 o= f my=0A> bug description.=0A>=0A>=0A> * Bugs=0A> ** SOMEDAY org-mode bug wi= th 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-b34= a-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 pe= rl :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 :no= web yes=0A> =A0=A0 ATestFile.org=0A> =A0=A0 #+end_src=0A>=0A> =A0=A0 #+srcn= ame: 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 th= e 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 T= imeframe is based on memory, not=0A> =A0=A0 actual checking, so first a bis= ect 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 fr= om ATestFile.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> pri= nt "Hello world\n";=0A> #+end_src=0A>=0A> * End of org file=0A>=0A>=0A=0A--= =0AEric Schulte=0Ahttp://cs.unm.edu/~eschulte/=0A