From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [BUG] [babel] in :eval never with :session Date: Tue, 10 Jun 2014 15:27:26 +0200 Message-ID: References: <87eh06ndy5.fsf@gmail.com> <87tx7yezb5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuM5W-0002iP-Bf for emacs-orgmode@gnu.org; Tue, 10 Jun 2014 09:27:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuM5N-0001W0-PY for emacs-orgmode@gnu.org; Tue, 10 Jun 2014 09:27:42 -0400 Received: from mail-we0-f171.google.com ([74.125.82.171]:62885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuM5N-0001Vl-GG for emacs-orgmode@gnu.org; Tue, 10 Jun 2014 09:27:33 -0400 Received: by mail-we0-f171.google.com with SMTP id q58so3909244wes.30 for ; Tue, 10 Jun 2014 06:27:32 -0700 (PDT) In-Reply-To: <87tx7yezb5.fsf@gmail.com> (Eric Schulte's message of "Fri, 06 Jun 2014 08:46:17 -0400") 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@gnu.org, Charles Berry --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eric Schulte writes: > Rainer M Krug writes: > >> Charles Berry writes: >> >>> Eric Schulte gmail.com> writes: >>> >>>>=20 >>>> Rainer M Krug krugs.de> writes: >>>>=20 >>>> > The error is back: >>>> > >>>>=20 >>>> You say "back", was this error not present recently? If so could you >>>> isolate the commit at which this error appeared? >>>>=20 >>> >>> The bug seems to be in the use of >>> >>> (org-link-search heading)=20 >>> >>> in org-babel-exp-in-export-file which is called in=20 >>> org-babel-exp-process-buffer.=20 >>> >>> That search will find the first heading that is a match after=20 >>> (point-min). So it will mess up other header args, too. >>> >>> It was there back in 8.0.7 and recent commits did not touch it AFAICS. >> >> Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ >> /usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.6/share/emacs/24.3/lisp/org= /) >> >> as well. I don't think it makes sense to go further back.=20 >> >> So no regression, but bug. >> > > Thanks Charles for pointing out the use of `org-link-search' in > `org-babel-exp-in-export-file' as the source of the problem. I'm not > sure there's a clear solution here. Given that there may be a different > outline structure between the original and exported file (e.g., some > headlines may be present in the former and absent from the later), in > the presence of multiple headings with the same name there is no obvious > (to me) way to find a given heading from the exported file in the > original file. > > I've just pushed up a change, so that when headings have IDs these will > be used instead of the heading text to find related heading in the > original buffer. This should provide a workaround when multiple > headings with the same text are desired---just add IDs to all such > headings. Sounds great - thanks. This leaves just one question: is there a way of automatically creating IDs for new headers? Thanks, Rainer > > Best, > >> >> Cheers, >> >> Rainer >> >>> >>> HTH, >>> >>> Chuck >>> >>>> Thanks, >>>> Eric >>>>=20 >>>> > >>>> > When one header in a subtree which has the header argument >>>> > :eval never >>>> > has the same name as in a following subtree which should be evaluate= d on >>>> > export, the second subtree is not exported. When the name of the hea= der >>>> > is changed, the subtree is exported as expected. >>>> > >>>> > --8<---------------cut here---------------start------------->8--- >>>> > #+PROPERTY: exports both >>>> > #+PROPERTY: session *tmp_R* >>>> > >>>> > * Some non-evaluated code >>>> > :PROPERTIES: >>>> > :eval: never >>>> > :END: >>>> > ** This is the same header >>>> > #+BEGIN_SRC R >>>> > cat("\ntwo\n") >>>> > #+END_SRC >>>> > >>>> > * Data Assessment Results >>>> > ** This is the same header >>>> > If the name of the header is changed, the subtree is evaluated on ex= port. >>>> > #+begin_src R >>>> > cat("\nhere it is <= at> >>> = =20 >>> = >>> \n") >>>> > #+end_src >>>> > --8<---------------cut here---------------end--------------->8--- >>>> >=20=20 >>>> > Org-mode version 8.2.6 (release_8.2.6-920-gc6d698 =20 >>> /Users/rainerkrug/.emacs.d/org-mode/lisp/) >>>> > GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 Ap= pKit >>> 1265) of 2014-02-13 on Rainers-MacBook-Pro-2.local >>>> > >>>> > Cheers, >>>> > >>>> > Rainer >>>>=20 >>> >>> >>> >>> >>> =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTlwe+AAoJENvXNx4PUvmC5PkH/iDXUscTt6u164d+v5uevtll Bz0uSQGSfciqWAvhZyllneDqvyDYaeyDIF2FI5LBOOnvoW88UeIp0NL+R1+P1wH7 QBqTzlzi9Mbclhm1hYjZPqWhcU/o/e4L5XguqyF9Ah9uYWXB/GvWux6cFGTDbKVU aqyNvMdClybw8zdguD/ciBS+/QAABMSBdQoAmvXMi6ETrDcZ5+izXrNzleJ8OUNA Tc0g78CZAjPP8ksMcPGyB9jryabf+4crV5cAbcFyIf4l4JVdpJUYuJuHLtqqDcge I7Cvhfxp0IkIj1uQDRQlDtUfkDzh8hfGm8UfBeis5lg3lKWAiFbLGFSZZAyDMdY= =0WNk -----END PGP SIGNATURE----- --=-=-=--