Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :results output option #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michaelkpfeifer
Copy link

Adding a ":results output" option suppresses the output of the respective computation in IEx. This allows to use IO.puts/2 or IO.inspect/2 without displaying the result of the computation.

Compare

      #+BEGIN_SRC elixir :results output
        IO.inspect List.to_string('hello')
        IO.inspect String.to_charlist("hello")
      #+END_SRC

      #+RESULTS:
      : "hello"
      : 'hello'

to

      #+BEGIN_SRC elixir
        IO.inspect List.to_string('hello')
        IO.inspect String.to_charlist("hello")
      #+END_SRC

      #+RESULTS:
      : "hello"
      : 'hello'
      : 'hello'

Adding a ":results output" option suppresses the output of the respective
computation in IEx. This allows to use IO.puts/2 or IO.inspect/2 without
displaying the result of the computation.
In some cases, the output prouced by 'ob-elixir-eval' includes a :"do
not show this result in output" value that is not displayed by IEx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant