Re: [O] [BUG] [Babel] Do not try to process inline source in macro templates
Nicolas Girard writes: > 2013/9/2 Eric Schulte : >>> >>> I've just pushed up a fix for this issue which should now ignore inline >>> source blocks on lines starting with "#+" during export. I don't know >>> if there is a better way than using a regex to detect such non-exporting >>> lines but this appears to work. >>> > > Thanks very much ! > I've just pushed up a better (read: functional) solution suggested by Nicolas Goaziou which uses org-element to determine when code blocks should be executed. This the current Org-mode the following example file exports without error as expected. #+Title: Example #+Options: ^:{} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis src_emacs-lisp{(current-time-string)} dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. # Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec # hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam # nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis # natoque penatibus et magnis src_emacs-lisp{(error "don't evaluate me!!")} # dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec # vitae dolor. Nullam tristique diam non turpis. Cras placerat # accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. - Lorem - ipsum - dolor src_emacs-lisp{(current-time-string)} - sit - amet #+MACRO: name src_emacs-lisp{(error "don't evaluate me!!")} #+begin_src emacs-lisp :exports results (current-time-string) ;; foo (current-time-string) #+end_src # #+begin_src emacs-lisp :export results # (error "don't evaluate me!!") # #+end_src Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [BUG] [Babel] Do not try to process inline source in macro templates
2013/9/2 Eric Schulte : >> >> I've just pushed up a fix for this issue which should now ignore inline >> source blocks on lines starting with "#+" during export. I don't know >> if there is a better way than using a regex to detect such non-exporting >> lines but this appears to work. >> Thanks very much !
Re: [O] [BUG] [Babel] Do not try to process inline source in macro templates
Thank you Eric. - Carsten On 2.9.2013, at 18:35, Eric Schulte wrote: > Nicolas Girard writes: > >> When a buffer contains such >> >>#+MACRO: m src_emacs-lisp[:results raw]{(do-something "$1")} >> >> macro template, calling =org-babel-execute-buffer= using =C-c C-v C-b= yields >> >>if: No id found: $1 >> >> It seems to me that Babel shouldn't be looking for inline code within >> macro templates. >> > > I've just pushed up a fix for this issue which should now ignore inline > source blocks on lines starting with "#+" during export. I don't know > if there is a better way than using a regex to detect such non-exporting > lines but this appears to work. > > Cheers, > > -- > Eric Schulte > https://cs.unm.edu/~eschulte > PGP: 0x614CA05D >
Re: [O] [BUG] [Babel] Do not try to process inline source in macro templates
Nicolas Girard writes: > When a buffer contains such > > #+MACRO: m src_emacs-lisp[:results raw]{(do-something "$1")} > > macro template, calling =org-babel-execute-buffer= using =C-c C-v C-b= yields > > if: No id found: $1 > > It seems to me that Babel shouldn't be looking for inline code within > macro templates. > I've just pushed up a fix for this issue which should now ignore inline source blocks on lines starting with "#+" during export. I don't know if there is a better way than using a regex to detect such non-exporting lines but this appears to work. Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
[O] [BUG] [Babel] Do not try to process inline source in macro templates
When a buffer contains such #+MACRO: m src_emacs-lisp[:results raw]{(do-something "$1")} macro template, calling =org-babel-execute-buffer= using =C-c C-v C-b= yields if: No id found: $1 It seems to me that Babel shouldn't be looking for inline code within macro templates. Cheers, -- Nicolas