all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fwd: request regarding code chunk options in org-babel.
       [not found] <CAA_SOTZfm5PCbStnE1_L25T4mFRtvS+jS6VP6j_0nde6LXCKxA@mail.gmail.com>
@ 2013-03-12 19:37 ` shripad sinari
  2013-03-13 15:08   ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: shripad sinari @ 2013-03-12 19:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

Hello all,
 I have been using org-mode and particularly org-babel for reproducible
research. From reading most of the code chunk options in the org manual
 it seems that the follwoing table would be how one would expect output
in various formats to behave:

| :results value | :exports value | In Buffer | In PDF | Evaluation |
|---------------------+---------------------+-------------+------------+----------------|
| silent             | results            | no          | yes      | yes
        |
| replace/other  | none               | yes        | no        | yes
    |
| silent             | none               | no          | no        | yes
        |
|---------------------+----------------------+-------------+------------+------------
   |

However from this thread:
http://comments.gmane.org/gmane.emacs.orgmode/46625
 it appears that this is not the case. Is there a way,
to get this table to be valid out of the box? This might be useful.

Please let me know.
Thanks and regards,

Shripad
Tucson, AZ

[-- Attachment #2: Type: text/html, Size: 1473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: request regarding code chunk options in org-babel.
  2013-03-12 19:37 ` Fwd: request regarding code chunk options in org-babel shripad sinari
@ 2013-03-13 15:08   ` Eric Schulte
  2013-03-13 18:14     ` shripad sinari
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2013-03-13 15:08 UTC (permalink / raw)
  To: shripad sinari; +Cc: emacs-orgmode

shripad sinari <shripad.sinari@gmail.com> writes:

> Hello all,
>  I have been using org-mode and particularly org-babel for reproducible
> research. From reading most of the code chunk options in the org manual
>  it seems that the follwoing table would be how one would expect output
> in various formats to behave:
>
> | :results value | :exports value | In Buffer | In PDF | Evaluation |
> |----------------+----------------+-----------+--------+------------|
> | silent         | results        | no        | yes    | yes        |
> | replace/other  | none           | yes       | no     | yes        |
> | silent         | none           | no        | no     | yes        |
>

Perhaps the documentation should be changed to more clearly express that
adding ":results silent" will inhibit insertion of results in the buffer
even during export.

>
> However from this thread:
> http://comments.gmane.org/gmane.emacs.orgmode/46625

Is there a reason that the solution posted in that thread does not work
for you?

Best,

> 
>  it appears that this is not the case. Is there a way, to get this
> table to be valid out of the box? This might be useful.
>
> Please let me know.
> Thanks and regards,
>
> Shripad
> Tucson, AZ

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: request regarding code chunk options in org-babel.
  2013-03-13 15:08   ` Eric Schulte
@ 2013-03-13 18:14     ` shripad sinari
  2013-03-14 19:57       ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: shripad sinari @ 2013-03-13 18:14 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

Hello Eric,
The posted solution works. But the issue is that I have to do this a lot of
times for selective code chunks in multiple documents. Writing the sexp
each time is not very elegant. Besides, if I were to come up with some
solution than I did not want  it to break anything else. Perhaps my
question is still ambiguous and the right question should be does value of
":results" plist overrride the one from ":exports", i.e., is there any
precedence order to the chunk options that is implicit, that i have not yet
grasped from the documentation?

Thanks for your patience and help.
Regards,
Shripad.

Shripad
Tucson, AZ


On Wed, Mar 13, 2013 at 8:08 AM, Eric Schulte <schulte.eric@gmail.com>wrote:

> shripad sinari <shripad.sinari@gmail.com> writes:
>
> > Hello all,
> >  I have been using org-mode and particularly org-babel for reproducible
> > research. From reading most of the code chunk options in the org manual
> >  it seems that the follwoing table would be how one would expect output
> > in various formats to behave:
> >
> > | :results value | :exports value | In Buffer | In PDF | Evaluation |
> > |----------------+----------------+-----------+--------+------------|
> > | silent         | results        | no        | yes    | yes        |
> > | replace/other  | none           | yes       | no     | yes        |
> > | silent         | none           | no        | no     | yes        |
> >
>
> Perhaps the documentation should be changed to more clearly express that
> adding ":results silent" will inhibit insertion of results in the buffer
> even during export.
>
> >
> > However from this thread:
> > http://comments.gmane.org/gmane.emacs.orgmode/46625
>
> Is there a reason that the solution posted in that thread does not work
> for you?
>
> Best,
>
> >
> >  it appears that this is not the case. Is there a way, to get this
> > table to be valid out of the box? This might be useful.
> >
> > Please let me know.
> > Thanks and regards,
> >
> > Shripad
> > Tucson, AZ
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte
>

[-- Attachment #2: Type: text/html, Size: 3071 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: request regarding code chunk options in org-babel.
  2013-03-13 18:14     ` shripad sinari
@ 2013-03-14 19:57       ` Eric Schulte
  2013-03-14 20:04         ` shripad sinari
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2013-03-14 19:57 UTC (permalink / raw)
  To: shripad sinari; +Cc: emacs-orgmode

shripad sinari <shripad.sinari@gmail.com> writes:

> Hello Eric,
> The posted solution works. But the issue is that I have to do this a lot of
> times for selective code chunks in multiple documents. Writing the sexp
> each time is not very elegant.

As the sexp is just elisp you can easily to add a function to your
.emacs configuration which makes this process easier.  For example.

     ;; -*- emacs-lisp -*-
     (defun exp-only () (if org-current-export-file "replace" "silent"))

allowing you to then do the following in your Org-mode files


     #+begin_src sh :results (exp-only) :exports results
       echo  "I want to see this in HTML/PDF, but not in Org"
     #+end_src

> Besides, if I were to come up with some solution than I did not want
> it to break anything else.

The above solution will not break anything else.

> Perhaps my question is still ambiguous and the right question should
> be does value of ":results" plist overrride the one from ":exports",
> i.e., is there any precedence order to the chunk options that is
> implicit, that i have not yet grasped from the documentation?
>

I don't believe "override" is the right term here, they are orthogonal.
So, ":exports results" does mean that the results will be exported, if
those results are "silent" then while they are run during export, there
nothing is added to the exported document.

>
> Thanks for your patience and help.

I hope this does help.  One goal of Org-mode's code block support is to
provide as much functionality as possible from a core which is as
composed of a small number of orthogonal working pieces.  This maximizes
flexibility and utility with a minimum of maintenance and implementation
overhead.

Cheers,

> 
> Regards, Shripad.
>
> Shripad
> Tucson, AZ
>
>
> On Wed, Mar 13, 2013 at 8:08 AM, Eric Schulte <schulte.eric@gmail.com>wrote:
>
>> shripad sinari <shripad.sinari@gmail.com> writes:
>>
>> > Hello all,
>> >  I have been using org-mode and particularly org-babel for reproducible
>> > research. From reading most of the code chunk options in the org manual
>> >  it seems that the follwoing table would be how one would expect output
>> > in various formats to behave:
>> >
>> > | :results value | :exports value | In Buffer | In PDF | Evaluation |
>> > |----------------+----------------+-----------+--------+------------|
>> > | silent         | results        | no        | yes    | yes        |
>> > | replace/other  | none           | yes       | no     | yes        |
>> > | silent         | none           | no        | no     | yes        |
>> >
>>
>> Perhaps the documentation should be changed to more clearly express that
>> adding ":results silent" will inhibit insertion of results in the buffer
>> even during export.
>>
>> >
>> > However from this thread:
>> > http://comments.gmane.org/gmane.emacs.orgmode/46625
>>
>> Is there a reason that the solution posted in that thread does not work
>> for you?
>>
>> Best,
>>
>> >
>> >  it appears that this is not the case. Is there a way, to get this
>> > table to be valid out of the box? This might be useful.
>> >
>> > Please let me know.
>> > Thanks and regards,
>> >
>> > Shripad
>> > Tucson, AZ
>>
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte
>>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: request regarding code chunk options in org-babel.
  2013-03-14 19:57       ` Eric Schulte
@ 2013-03-14 20:04         ` shripad sinari
  0 siblings, 0 replies; 5+ messages in thread
From: shripad sinari @ 2013-03-14 20:04 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3598 bytes --]

Thanks Eric!


Shripad
Tucson, AZ


On Thu, Mar 14, 2013 at 12:57 PM, Eric Schulte <schulte.eric@gmail.com>wrote:

> shripad sinari <shripad.sinari@gmail.com> writes:
>
> > Hello Eric,
> > The posted solution works. But the issue is that I have to do this a lot
> of
> > times for selective code chunks in multiple documents. Writing the sexp
> > each time is not very elegant.
>
> As the sexp is just elisp you can easily to add a function to your
> .emacs configuration which makes this process easier.  For example.
>
>      ;; -*- emacs-lisp -*-
>      (defun exp-only () (if org-current-export-file "replace" "silent"))
>
> allowing you to then do the following in your Org-mode files
>
>
>      #+begin_src sh :results (exp-only) :exports results
>        echo  "I want to see this in HTML/PDF, but not in Org"
>      #+end_src
>
> > Besides, if I were to come up with some solution than I did not want
> > it to break anything else.
>
> The above solution will not break anything else.
>
> > Perhaps my question is still ambiguous and the right question should
> > be does value of ":results" plist overrride the one from ":exports",
> > i.e., is there any precedence order to the chunk options that is
> > implicit, that i have not yet grasped from the documentation?
> >
>
> I don't believe "override" is the right term here, they are orthogonal.
> So, ":exports results" does mean that the results will be exported, if
> those results are "silent" then while they are run during export, there
> nothing is added to the exported document.
>
> >
> > Thanks for your patience and help.
>
> I hope this does help.  One goal of Org-mode's code block support is to
> provide as much functionality as possible from a core which is as
> composed of a small number of orthogonal working pieces.  This maximizes
> flexibility and utility with a minimum of maintenance and implementation
> overhead.
>
> Cheers,
>
> >
> > Regards, Shripad.
> >
> > Shripad
> > Tucson, AZ
> >
> >
> > On Wed, Mar 13, 2013 at 8:08 AM, Eric Schulte <schulte.eric@gmail.com
> >wrote:
> >
> >> shripad sinari <shripad.sinari@gmail.com> writes:
> >>
> >> > Hello all,
> >> >  I have been using org-mode and particularly org-babel for
> reproducible
> >> > research. From reading most of the code chunk options in the org
> manual
> >> >  it seems that the follwoing table would be how one would expect
> output
> >> > in various formats to behave:
> >> >
> >> > | :results value | :exports value | In Buffer | In PDF | Evaluation |
> >> > |----------------+----------------+-----------+--------+------------|
> >> > | silent         | results        | no        | yes    | yes        |
> >> > | replace/other  | none           | yes       | no     | yes        |
> >> > | silent         | none           | no        | no     | yes        |
> >> >
> >>
> >> Perhaps the documentation should be changed to more clearly express that
> >> adding ":results silent" will inhibit insertion of results in the buffer
> >> even during export.
> >>
> >> >
> >> > However from this thread:
> >> > http://comments.gmane.org/gmane.emacs.orgmode/46625
> >>
> >> Is there a reason that the solution posted in that thread does not work
> >> for you?
> >>
> >> Best,
> >>
> >> >
> >> >  it appears that this is not the case. Is there a way, to get this
> >> > table to be valid out of the box? This might be useful.
> >> >
> >> > Please let me know.
> >> > Thanks and regards,
> >> >
> >> > Shripad
> >> > Tucson, AZ
> >>
> >> --
> >> Eric Schulte
> >> http://cs.unm.edu/~eschulte
> >>
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte
>

[-- Attachment #2: Type: text/html, Size: 5261 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-14 20:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAA_SOTZfm5PCbStnE1_L25T4mFRtvS+jS6VP6j_0nde6LXCKxA@mail.gmail.com>
2013-03-12 19:37 ` Fwd: request regarding code chunk options in org-babel shripad sinari
2013-03-13 15:08   ` Eric Schulte
2013-03-13 18:14     ` shripad sinari
2013-03-14 19:57       ` Eric Schulte
2013-03-14 20:04         ` shripad sinari

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.