From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Regression bug in tangle/weave Date: Fri, 01 Jul 2011 14:36:29 -0700 Message-ID: <87sjqpel94.fsf@gmail.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QclOQ-0001HH-59 for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 17:36:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QclOK-0004cK-Th for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 17:36:53 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:34667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QclOK-0004cG-Fl for emacs-orgmode@gnu.org; Fri, 01 Jul 2011 17:36:48 -0400 Received: by pzk4 with SMTP id 4so3965194pzk.0 for ; Fri, 01 Jul 2011 14:36:47 -0700 (PDT) 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: MidLifeXis at PerlMonks Cc: emacs-orgmode I normally keep `org-confirm-babel-evaluate' set to nil but to test the below I set it to t and was not prompted for evaluation. Do you have a code block named "file-version" in this file? If so then either that code block, or the results line will need to be renamed. When Org-mode finds both a code block _and_ a results line of the same name it defaults to evaluating the code block in case the results are stale. Cheers -- Eric MidLifeXis at PerlMonks writes: > I am still getting prompted with the 'Evaluate this text code block (file= -version) on your system?' message. > > What is your value of org-confirm-babel-evaluate set to?=C2=A0 Mine is set > as the default, 't.=C2=A0 According to the docs, this is the more secure > setting. > > > I updated no more than two weeks ago.=C2=A0 I will refresh my org-mode se= tup over the weekend and see if that takes care of it. > > Brian > > > > ----- Original Message ----- > From: Eric Schulte > To: MidLifeXis at PerlMonks > Cc: emacs-orgmode > Sent: Friday, July 1, 2011 2:14 PM > Subject: Re: [O] Regression bug in tangle/weave > > Yes, the second example I gave (shown immediately below) requires no > execution of code. > > =C2=A0 =C2=A0 #+begin_src text :tangle yes > =C2=A0 =C2=A0 =C2=A0 <>. > =C2=A0 =C2=A0 #+end_src > > =C2=A0 =C2=A0 #+results: file-version > =C2=A0 =C2=A0 : 1.2.3.4 > > Best -- Eric > > MidLifeXis at PerlMonks writes: > >> 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 blocks to execute without prompting, or prompting for >> authority to run the block every time the file is tangled? >> >> Brian >> >> >> >> ----- Original Message ----- >> From: Eric Schulte >> To: MidLifeXis at PerlMonks >> Cc: emacs-orgmode >> Sent: Thursday, June 30, 2011 1:30 PM >> Subject: Re: [O] Regression bug in tangle/weave >> >> Hi, >> >> Indeed this example below no longer works, however I believe the new >> behavior is both desired and permanent.=C2=A0 I'll explain and include an >> option for how your example could be restructured to work with the new >> code. >> >> We ran into problems automatically removing trailing newlines from code >> block bodies as in some languages (looking at you Python and Haskell) >> things like trailing newlines are of syntactic importance.=C2=A0 In your >> example this behavior results in the insertion of newlines after >> file-name and file-version.=C2=A0 Babel is careful to preserve line pref= ixes >> when expanding references in comments, so it then reproduces the >> >> =C2=A0 # Generated from=20 >> >> portion of that line for every line of the expanded noweb references. >> >> I would suggest the following alternatives, either using a data >> references in stead of a code block reference as in the file-version >> example below, or using an evaluated code block as in the file-name >> example below.=C2=A0 Hope this helps. >> >> Best -- Eric >> >> >> >> MidLifeXis at PerlMonks writes: >> >>> It appears that there may be a regression problem with the current >>> tangle/weave process.=C2=A0 I used to be able to have a noweb section f= or >>> the name of the file, another for the version of the file, and then >>> have an autogenerated header section that included those two pieces of >>> information on a single line.=C2=A0 Following is an org file snippet of= my >>> bug description. >>> >>> >>> * Bugs >>> ** SOMEDAY org-mode bug with tangle and newlines=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 :BUG: >>> =C2=A0=C2=A0 :PROPERTIES: >>> =C2=A0=C2=A0 :created: [2011-06-30 Thu 10:00] >>> =C2=A0=C2=A0 :ID: e4c992b5-4d35-443b-b34a-0fbda7c66aea >>> =C2=A0=C2=A0 :END: >>> =C2=A0=C2=A0 :LOGBOOK: >>> =C2=A0=C2=A0 - Added on [2011-06-30 Thu 10:00] >>> =C2=A0=C2=A0 :END: >>> =C2=A0=C2=A0 [2011-06-30 Thu] >>> >>> =C2=A0=C2=A0 A regression bug has surfaced in org-mode with the tangle/= weave >>> =C2=A0=C2=A0 process mangling the following setup: >>> >>> =C2=A0=C2=A0 #+begin_src perl :noweb yes :tangle testoutput.pl :shebang= #!perl >>> =C2=A0=C2=A0 # <> >>> =C2=A0=C2=A0 print "Hello world\n"; >>> =C2=A0=C2=A0 #+end_src >>> >>> =C2=A0=C2=A0 #+srcname: generated-from >>> =C2=A0=C2=A0 #+begin_src text :noweb yes >>> =C2=A0=C2=A0 Generated from <> version <>. >>> =C2=A0=C2=A0 #+end_src >>> >>> =C2=A0=C2=A0 #+srcname: file-name >>> =C2=A0=C2=A0 #+begin_src text :noweb yes >>> =C2=A0=C2=A0 ATestFile.org >>> =C2=A0=C2=A0 #+end_src >>> >>> =C2=A0=C2=A0 #+srcname: file-version >>> =C2=A0=C2=A0 #+begin_src text :noweb yes >>> =C2=A0=C2=A0 1.2.3.4 >>> =C2=A0=C2=A0 #+end_src >>> >>> =C2=A0=C2=A0 The last it worked* was sometime in the early 7.4 timefram= e.=C2=A0 If I >>> =C2=A0=C2=A0 get some time, I may do a bisect on it, although others ar= e welcome >>> =C2=A0=C2=A0 to do the work required.=C2=A0 Timeframe is based on memor= y, not >>> =C2=A0=C2=A0 actual checking, so first a bisect needs to be done to fin= d where >>> =C2=A0=C2=A0 it last worked. >>> >>> >>> *** Actual output >>> >>> #+begin_src perl >>> #!perl >>> >>> # Generated from ATestFile.org >>> # Generated from version 1.2.3.4 >>> # Generated from <> version . >>> #=20 >>> print "Hello world\n"; >>> #+end_src >>> >>> *** Expected output (or at least similar) >>> >>> #+begin_src perl >>> #!perl >>> >>> # Generated from ATestFile.org version 1.2.3.4. >>> >>> print "Hello world\n"; >>> #+end_src >>> >>> * End of org file >>> >>> --=20 Eric Schulte http://cs.unm.edu/~eschulte/