Re: [O] Possible to use src block to generate org headlines for export?

2014-07-26 Thread Andreas Leha
Nicolas Goaziou writes: >> But in that case let me return to and refine my proposal: Why not have >> "drawer" as the default unless "raw" is given? > > Probably because "raw" never breaks your document, and is less verbose > in the simplest cases (e.g., a single list, value, table...), which may

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-26 Thread Nicolas Goaziou
> But in that case let me return to and refine my proposal: Why not have > "drawer" as the default unless "raw" is given? Probably because "raw" never breaks your document, and is less verbose in the simplest cases (e.g., a single list, value, table...), which may be common enough. Anyway, it sh

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Andreas Leha
Nicolas Goaziou writes: > Andreas Leha writes: > >> But then, I do not understand your statement 'headlines are the only >> limitation to raw+replace behaviour'. >> >> This code block does not seem to respect 'raw+replace' for me: >> >> #+name: dtrn >> #+BEGIN_SRC R :results raw replace >> nwo

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Nicolas Goaziou
Andreas Leha writes: > But then, I do not understand your statement 'headlines are the only > limitation to raw+replace behaviour'. > > This code block does not seem to respect 'raw+replace' for me: > > #+name: dtrn > #+BEGIN_SRC R :results raw replace > nwords <- 500 > nletters <- sapply(1:n

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Thorsten Jolitz
Andreas Leha writes: > But then, I do not understand your statement 'headlines are the only > limitation to raw+replace behaviour'. > > This code block does not seem to respect 'raw+replace' for me: > > #+name: dtrn > #+BEGIN_SRC R :results raw replace > nwords <- 500 > nletters <- sapply(1:n

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Andreas Leha
Nicolas Goaziou writes: > Andreas Leha writes: > >> Nicolas Goaziou writes: > >>> No matter how special the results drawer is, it cannot (and shouldn't) >>> contain headlines. >> >> You are the master of the parser... > > That's why I carefully avoid shooting myself in the foot. There is (at >

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Nicolas Goaziou
Andreas Leha writes: > Nicolas Goaziou writes: >> No matter how special the results drawer is, it cannot (and shouldn't) >> contain headlines. > > You are the master of the parser... That's why I carefully avoid shooting myself in the foot. There is (at least) a good reason why only headlines

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Andreas Leha
Hi Nicolas, Nicolas Goaziou writes: > Hello, > > Andreas Leha writes: > >> Is that a valid feature request: >> Allow the combination of :results raw and :results replace -- regardless >> of the produced content? >> >> IIUC the parser does not allow this right now. But (without any >> knowledge

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-25 Thread Nicolas Goaziou
Hello, Andreas Leha writes: > Is that a valid feature request: > Allow the combination of :results raw and :results replace -- regardless > of the produced content? > > IIUC the parser does not allow this right now. But (without any > knowledge on the parser) I can imagine > 'special' results d

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-24 Thread Brett Viren
Matt Lundin writes: > That sounds interesting. I look forward to hearing more! It's not yet usable for anything real but I'm keeping the work here: https://github.com/brettviren/orgonpy -Brett. pgptNgTBz8D6F.pgp Description: PGP signature

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-24 Thread Nick Dokos
Charles Berry writes: > Nick Dokos gmail.com> writes: > >> >> Charles Berry ucsd.edu> writes: >> >> > Matt Lundin imapmail.org> writes: >> > >> > [deleted] > [more deleted] > >> > Or wrap the results in a drawer when you type C-c C-c, but render them as >> > raw on export (which removes the

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-24 Thread Charles Berry
Nick Dokos gmail.com> writes: > > Charles Berry ucsd.edu> writes: > > > Matt Lundin imapmail.org> writes: > > > > [deleted] [more deleted] > > Or wrap the results in a drawer when you type C-c C-c, but render them as > > raw on export (which removes the drawer and replaces with raw results)

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-24 Thread Andreas Leha
Hi all, Nick Dokos writes: > Charles Berry writes: > >> Matt Lundin imapmail.org> writes: >> >> [deleted] >> >>> Footnotes: >>> >>> [fn:1] If one really needs to see the headlines in the original org >>> buffer, a hook can be used to remove the :RESULTS: drawer. >>> >>> --8<---cu

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Nick Dokos
Charles Berry writes: > Matt Lundin imapmail.org> writes: > > [deleted] > >> Footnotes: >> >> [fn:1] If one really needs to see the headlines in the original org >> buffer, a hook can be used to remove the :RESULTS: drawer. >> >> --8<---cut here---start->8--

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Matt Lundin
Brett Viren writes: > Matt Lundin writes: > >> Brett Viren writes: >>> >>> Maybe it would be more convenient to add the "meta-ness" you want as >>> part of a new exporter process? >> >> To change the "meta" wrappers for code block results, we would have to >> modify org babel (ob-core.el). >

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Brett Viren
Matt Lundin writes: > Brett Viren writes: >> >> Maybe it would be more convenient to add the "meta-ness" you want as >> part of a new exporter process? > > To change the "meta" wrappers for code block results, we would have to > modify org babel (ob-core.el). Just to be clear (hopefully) I a

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Matt Lundin
Charles Berry writes: > Matt Lundin imapmail.org> writes: > > Or wrap the results in a drawer when you type C-c C-c, but render them as > raw on export (which removes the drawer and replaces with raw results). > > Like so: > > #+header: :results (if (boundp 'backend) "raw" "drawer") > #+BEGIN_

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Rick Frankel
On 2014-07-22 22:35, Matt Lundin wrote: Nick Dokos writes: In short, is there a more graceful and export-friendly way to use babel to generate org headlines for export? Or is there an easy way to get the export backend to delete the opening part of the drawer (i.e., :RESULTS:)? Any advice wo

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Charles Berry
Matt Lundin imapmail.org> writes: [deleted] > Footnotes: > > [fn:1] If one really needs to see the headlines in the original org > buffer, a hook can be used to remove the :RESULTS: drawer. > > --8<---cut here---start->8--- > (defun my-remove-stray-results-d

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Matt Lundin
Hi Brett, Brett Viren writes: > Matt Lundin writes: > >> Let's hope the real blog (when I get around to publishing it) is more >> interesting than the example above. ;) > > Maybe it would be more convenient to add the "meta-ness" you want as > part of a new exporter process? To change the "m

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Brett Viren
Matt Lundin writes: > Let's hope the real blog (when I get around to publishing it) is more > interesting than the example above. ;) Maybe it would be more convenient to add the "meta-ness" you want as part of a new exporter process? -Brett. pgpX0dUH7NC9P.pgp Description: PGP signature

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-22 Thread Matt Lundin
Correction below... Matt Lundin writes: > > #+BEGIN_SRC emacs-lisp :exports none :results none > (save-excursion > (goto-char (point-min)) > (while (re-search-forward "#\\+RESULTS: generate-blog-summary" nil t) (when ... > (beginning-of-line) > (delete-region (point) (

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-22 Thread Matt Lundin
Nick Dokos writes: >> >> In short, is there a more graceful and export-friendly way to use babel >> to generate org headlines for export? Or is there an easy way to get the >> export backend to delete the opening part of the drawer (i.e., >> :RESULTS:)? >> >> Any advice would be greatly appreciate

Re: [O] Possible to use src block to generate org headlines for export?

2014-07-22 Thread Nick Dokos
Matt Lundin writes: > I am attempting to use a babel code snippet to generate org headlines > for export. However, I seem to be running into a corner case here. > > AFAICT, the only way to generate headlines safely with babel is to wrap > them in a :RESULTS: drawer. > > Take the following example

[O] Possible to use src block to generate org headlines for export?

2014-07-22 Thread Matt Lundin
I am attempting to use a babel code snippet to generate org headlines for export. However, I seem to be running into a corner case here. AFAICT, the only way to generate headlines safely with babel is to wrap them in a :RESULTS: drawer. Take the following example: --8<---cut here