emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jack Kamm <jackkamm@gmail.com>
To: R C <recifx@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: ob-python.el: questions about output
Date: Sun, 23 Feb 2020 20:52:08 -0800	[thread overview]
Message-ID: <87eeuky4cn.fsf@gmail.com> (raw)
In-Reply-To: <CAD_Xbc6Tcu0rtnyiOD2WBfPigZX9UB2oVRMnBgu2RQHrGsy7JQ@mail.gmail.com>

Hi RC,

R C <recifx@gmail.com> writes:

> 1. Is it possible to have both types of output displayed from a single src
> block to avoid having to duplicate the src block, using :exports results
> for one and :exports both for the other?

No, there's no option to output both ":results output" and ":results value".

If you want both output and value results, and want to avoid executing
the same code twice, you could consider using a pair of ":session"
blocks, for example: 

#+begin_src python :session session1 :results output
print("Block that does some computations")
x = 1+1
#+end_src

#+begin_src python :session session1 :results output
x
#+end_src

> 2. Is there an option to suppress export of the the last line of the src
> block which is specific to the ob-python implementation.

I'm not sure what you mean by this, could you give an example of what
the observed and desired behaviors are?

  reply	other threads:[~2020-02-24  4:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 16:43 ob-python.el: questions about output R C
2020-02-24  4:52 ` Jack Kamm [this message]
2020-02-24  4:53   ` Jack Kamm
2020-02-24  7:13   ` R C
2020-02-24 13:42     ` Fraga, Eric
2020-02-24 16:18       ` Jack Kamm
2020-02-24 16:49         ` Fraga, Eric
2020-02-24 16:17     ` Jack Kamm
2020-02-24 16:40       ` Fraga, Eric
2020-02-27  4:29       ` R C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eeuky4cn.fsf@gmail.com \
    --to=jackkamm@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=recifx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).