* [babel] Silent output in Org, but verbose export
@ 2011-09-06 15:39 Sebastien Vauban
2011-09-06 16:37 ` Eric Schulte
0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2011-09-06 15:39 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric,
Currently, the following does not seem possible:
#+begin_src sh :results silent :exports results
echo "I want to see this in HTML/PDF, but not in Org"
#+end_src
Is there a way to do so? That is:
- have no results inserted in the Org file
- well inserted when exporting the Org file
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [babel] Silent output in Org, but verbose export
2011-09-06 15:39 [babel] Silent output in Org, but verbose export Sebastien Vauban
@ 2011-09-06 16:37 ` Eric Schulte
2011-09-07 8:25 ` Rainer M Krug
2011-09-07 8:44 ` Sebastien Vauban
0 siblings, 2 replies; 6+ messages in thread
From: Eric Schulte @ 2011-09-06 16:37 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: emacs-orgmode
"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:
> Hi Eric,
>
> Currently, the following does not seem possible:
>
> #+begin_src sh :results silent :exports results
> echo "I want to see this in HTML/PDF, but not in Org"
> #+end_src
>
> Is there a way to do so? That is:
> - have no results inserted in the Org file
> - well inserted when exporting the Org file
>
> Best regards,
> Seb
Hi Seb,
While this functionality isn't explicitly built into Org-mode the
following should work...
#+begin_src sh :results (if org-current-export-file "replace" "silent") :exports both
echo "I want to see this in HTML/PDF, but not in Org"
#+end_src
Best -- Eric
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [babel] Silent output in Org, but verbose export
2011-09-06 16:37 ` Eric Schulte
@ 2011-09-07 8:25 ` Rainer M Krug
2011-09-07 8:44 ` Sebastien Vauban
1 sibling, 0 replies; 6+ messages in thread
From: Rainer M Krug @ 2011-09-07 8:25 UTC (permalink / raw)
To: Eric Schulte; +Cc: Sebastien Vauban, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]
On Tue, Sep 6, 2011 at 6:37 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:
>
> > Hi Eric,
> >
> > Currently, the following does not seem possible:
> >
> > #+begin_src sh :results silent :exports results
> > echo "I want to see this in HTML/PDF, but not in Org"
> > #+end_src
> >
> > Is there a way to do so? That is:
> > - have no results inserted in the Org file
> > - well inserted when exporting the Org file
> >
> > Best regards,
> > Seb
>
> Hi Seb,
>
> While this functionality isn't explicitly built into Org-mode the
> following should work...
>
> #+begin_src sh :results (if org-current-export-file "replace" "silent")
> :exports both
> echo "I want to see this in HTML/PDF, but not in Org"
> #+end_src
>
Without adding to many header arguments, I think an additional value for
the handling header argument ":results" would be useful: export_only, which,
would implement this behaviour.
Cheers,
Rainer
> Best -- Eric
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>
>
--
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 (F): +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
[-- Attachment #2: Type: text/html, Size: 2486 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [babel] Silent output in Org, but verbose export
2011-09-06 16:37 ` Eric Schulte
2011-09-07 8:25 ` Rainer M Krug
@ 2011-09-07 8:44 ` Sebastien Vauban
2011-09-07 15:15 ` Eric Schulte
1 sibling, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2011-09-07 8:44 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric,
Eric Schulte wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> Currently, the following does not seem possible:
>>
>> #+begin_src sh :results silent :exports results
>> echo "I want to see this in HTML/PDF, but not in Org"
>> #+end_src
>>
>> Is there a way to do so? That is:
>> - have no results inserted in the Org file
>> - well inserted when exporting the Org file
>
> While this functionality isn't explicitly built into Org-mode the
> following should work...
>
> #+begin_src sh :results (if org-current-export-file "replace" "silent") :exports both
> echo "I want to see this in HTML/PDF, but not in Org"
> #+end_src
This works perfectly, thanks a lot!
Now, subquestion: let's suppose I first write this code block...
#+begin_src sh :exports results
echo "I want to see this in HTML/PDF, but not in Org"
#+end_src
#+results:
| I want to see this in HTML/PDF | but not in Org |
then I add the option "silent", and eval it:
#+begin_src sh :results silent :exports results
echo "I want to see this in HTML/PDF, but not in Org"
#+end_src
#+results:
| I want to see this in HTML/PDF | but not in Org |
The =results= line is not removed automatically. I have to delete it myself.
Question: wouldn't it be better to check, when option is =silent=, that there is
no =results= line, and remove it if there is one?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [babel] Silent output in Org, but verbose export
2011-09-07 8:44 ` Sebastien Vauban
@ 2011-09-07 15:15 ` Eric Schulte
2011-09-07 20:23 ` Sebastien Vauban
0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2011-09-07 15:15 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: emacs-orgmode
Hi Seb,
>
> Now, subquestion: let's suppose I first write this code block...
>
> #+begin_src sh :exports results
> echo "I want to see this in HTML/PDF, but not in Org"
> #+end_src
>
> #+results:
> | I want to see this in HTML/PDF | but not in Org |
>
> then I add the option "silent", and eval it:
>
> #+begin_src sh :results silent :exports results
> echo "I want to see this in HTML/PDF, but not in Org"
> #+end_src
>
> #+results:
> | I want to see this in HTML/PDF | but not in Org |
>
> The =results= line is not removed automatically. I have to delete it myself.
>
> Question: wouldn't it be better to check, when option is =silent=, that there is
> no =results= line, and remove it if there is one?
>
I tried implementing this change (a simple one-line addition) but it
breaks some other pieces of code block evaluation (inline blocks) which
assume that ":results silent" will not affect the contents of the
buffer.
For not at least I think it would be preferable to leave the meaning of
silent to be "do nothing to the buffer" rather than to remove any
possibly pre-existing results. Possibly at some point in the future
after I've fixed results removal for inline blocks we should revisit
this decision.
Best -- Eric
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [babel] Silent output in Org, but verbose export
2011-09-07 15:15 ` Eric Schulte
@ 2011-09-07 20:23 ` Sebastien Vauban
0 siblings, 0 replies; 6+ messages in thread
From: Sebastien Vauban @ 2011-09-07 20:23 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric,
Eric Schulte wrote:
>> Now, subquestion: let's suppose I first write this code block...
>>
>> #+begin_src sh :exports results
>> echo "I want to see this in HTML/PDF, but not in Org"
>> #+end_src
>>
>> #+results:
>> | I want to see this in HTML/PDF | but not in Org |
>>
>> then I add the option "silent", and eval it:
>>
>> #+begin_src sh :results silent :exports results
>> echo "I want to see this in HTML/PDF, but not in Org"
>> #+end_src
>>
>> #+results:
>> | I want to see this in HTML/PDF | but not in Org |
>>
>> The =results= line is not removed automatically. I have to delete it myself.
>>
>> Question: wouldn't it be better to check, when option is =silent=, that there is
>> no =results= line, and remove it if there is one?
>>
>
> I tried implementing this change (a simple one-line addition) but it
> breaks some other pieces of code block evaluation (inline blocks) which
> assume that ":results silent" will not affect the contents of the
> buffer.
>
> For not at least I think it would be preferable to leave the meaning of
> silent to be "do nothing to the buffer" rather than to remove any
> possibly pre-existing results. Possibly at some point in the future
> after I've fixed results removal for inline blocks we should revisit
> this decision.
Fine with me. Thanks for trying!
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-07 20:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06 15:39 [babel] Silent output in Org, but verbose export Sebastien Vauban
2011-09-06 16:37 ` Eric Schulte
2011-09-07 8:25 ` Rainer M Krug
2011-09-07 8:44 ` Sebastien Vauban
2011-09-07 15:15 ` Eric Schulte
2011-09-07 20:23 ` Sebastien Vauban
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.