From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [BUG] [babel] in :eval never with :session Date: Fri, 06 Jun 2014 08:46:17 -0400 Message-ID: <87tx7yezb5.fsf@gmail.com> References: <87eh06ndy5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxiX-0007cC-ND for emacs-orgmode@gnu.org; Fri, 06 Jun 2014 13:14:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsxiN-000247-Ns for emacs-orgmode@gnu.org; Fri, 06 Jun 2014 13:14:13 -0400 Received: from mail-qa0-x22e.google.com ([2607:f8b0:400d:c00::22e]:38602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxiN-00023s-KS for emacs-orgmode@gnu.org; Fri, 06 Jun 2014 13:14:03 -0400 Received: by mail-qa0-f46.google.com with SMTP id w8so4282913qac.33 for ; Fri, 06 Jun 2014 10:14:02 -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: Rainer M Krug Cc: emacs-orgmode@gnu.org, Charles Berry Rainer M Krug writes: > Charles Berry writes: > >> Eric Schulte gmail.com> writes: >> >>> >>> Rainer M Krug krugs.de> writes: >>> >>> > The error is back: >>> > >>> >>> You say "back", was this error not present recently? If so could you >>> isolate the commit at which this error appeared? >>> >> >> The bug seems to be in the use of >> >> (org-link-search heading) >> >> in org-babel-exp-in-export-file which is called in >> org-babel-exp-process-buffer. >> >> That search will find the first heading that is a match after >> (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. > > 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. Best, > > Cheers, > > Rainer > >> >> HTH, >> >> Chuck >> >>> Thanks, >>> Eric >>> >>> > >>> > 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 evaluated on >>> > export, the second subtree is not exported. When the name of the header >>> > 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 export. >>> > #+begin_src R >>> > cat("\nhere it is >> >> >> \n") >>> > #+end_src >>> > --8<---------------cut here---------------end--------------->8--- >>> > >>> > Org-mode version 8.2.6 (release_8.2.6-920-gc6d698 >> /Users/rainerkrug/.emacs.d/org-mode/lisp/) >>> > GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 AppKit >> 1265) of 2014-02-13 on Rainers-MacBook-Pro-2.local >>> > >>> > Cheers, >>> > >>> > Rainer >>> >> >> >> >> >> -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D (see https://u.fsf.org/yw)