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 should be

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

2014-07-26 Thread Andreas Leha
Nicolas Goaziou m...@nicolasgoaziou.fr 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...),

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

2014-07-25 Thread Nicolas Goaziou
Hello, Andreas Leha andreas.l...@med.uni-goettingen.de 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

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

2014-07-25 Thread Andreas Leha
Hi Nicolas, Nicolas Goaziou m...@nicolasgoaziou.fr writes: Hello, Andreas Leha andreas.l...@med.uni-goettingen.de 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

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

2014-07-25 Thread Nicolas Goaziou
Andreas Leha andreas.l...@med.uni-goettingen.de writes: Nicolas Goaziou m...@nicolasgoaziou.fr 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.

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

2014-07-25 Thread Andreas Leha
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Nicolas Goaziou m...@nicolasgoaziou.fr 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

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

2014-07-25 Thread Thorsten Jolitz
Andreas Leha andreas.l...@med.uni-goettingen.de 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

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

2014-07-25 Thread Nicolas Goaziou
Andreas Leha andreas.l...@med.uni-goettingen.de 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

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

2014-07-25 Thread Andreas Leha
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Andreas Leha andreas.l...@med.uni-goettingen.de 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

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

2014-07-24 Thread Andreas Leha
Hi all, Nick Dokos ndo...@gmail.com writes: Charles Berry ccbe...@ucsd.edu writes: Matt Lundin mdl at 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.

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

2014-07-24 Thread Charles Berry
Nick Dokos ndokos at gmail.com writes: Charles Berry ccberry at ucsd.edu writes: Matt Lundin mdl at 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

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

2014-07-24 Thread Nick Dokos
Charles Berry ccbe...@ucsd.edu writes: Nick Dokos ndokos at gmail.com writes: Charles Berry ccberry at ucsd.edu writes: Matt Lundin mdl at 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

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

2014-07-24 Thread Brett Viren
Matt Lundin m...@imapmail.org 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-23 Thread Brett Viren
Matt Lundin m...@imapmail.org 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

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

2014-07-23 Thread Matt Lundin
Hi Brett, Brett Viren b...@bnl.gov writes: Matt Lundin m...@imapmail.org 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?

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

2014-07-23 Thread Charles Berry
Matt Lundin mdl at 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

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 ndo...@gmail.com 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.,

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

2014-07-23 Thread Matt Lundin
Charles Berry ccbe...@ucsd.edu writes: Matt Lundin mdl at 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)

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

2014-07-23 Thread Brett Viren
Matt Lundin m...@imapmail.org writes: Brett Viren b...@bnl.gov 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

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

2014-07-23 Thread Matt Lundin
Brett Viren b...@bnl.gov writes: Matt Lundin m...@imapmail.org writes: Brett Viren b...@bnl.gov 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

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

2014-07-23 Thread Nick Dokos
Charles Berry ccbe...@ucsd.edu writes: Matt Lundin mdl at 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

[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

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

2014-07-22 Thread Nick Dokos
Matt Lundin m...@imapmail.org 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

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

2014-07-22 Thread Matt Lundin
Nick Dokos ndo...@gmail.com 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

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

2014-07-22 Thread Matt Lundin
Correction below... Matt Lundin m...@imapmail.org 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