# Change output destination with JUNO. Main document vs REPL

**URL:** <https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313>\
**Category:** Juno\
**Created:** [December 5, 2018, 12:07pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313 "2018-12-05T12:07:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [December 5, 2018, 12:07pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/1 "2018-12-05T12:07:11Z")

</div>

Hello.

When using Juno how can I control where the output of a command is produced?  
Some commands such as 1+1 produce an output on the right side of the line on the main document,inlined.  
Some other output the result only on the REPL, for example versioninfo().

How can I force Juno to change it?  
For example I want the result of 1+1 (executed at the main document) on the REPL, and I want the result ot versioninfo() (executed on the main document) on the main document.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [December 5, 2018, 12:43pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/2 "2018-12-05T12:43:45Z")

</div>

The difference you’re seeing is between printing results to `stdout` (which is what e.g. `versioninfo()` does), and returning a result (which is what `1+1` does).

You can change how results are shown via the “Result Display Mode” option:

 ![setting](https://global.discourse-cdn.com/julialang/original/3X/c/4/c481759f78ed1996889a16351b87b152a6ca4d81.png)

You can also print to a string with `sprint` and return that like so (the `Text` is just so it’s shown a bit nicer):

 ![sprint](https://global.discourse-cdn.com/julialang/original/3X/5/d/5dce21a59a1899749314975e2f077cafb75d5385.png)

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [December 5, 2018, 3:55pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/3 "2018-12-05T15:55:59Z")

</div>

> [@pfitzseb](#):
>
> “Result Display Mode”

OK, thanks.

Is there any command or macro that let you change the display mode of an specific line without going to the settings page?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [December 5, 2018, 3:56pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/4 "2018-12-05T15:56:52Z")

</div>

`@show` will always print to `stdout`, regardless of where results are displayed.

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [December 6, 2018, 9:00am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/5 "2018-12-06T09:00:25Z")

</div>

Where do I find this tab in juno?

> [@pfitzseb](#):
>
> “Result Display Mode” option:

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [December 6, 2018, 9:04am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/6 "2018-12-06T09:04:10Z")

</div>

Either like this:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/a/1a27d0a699b95216a2a49cfba79239841042d6a8.png)  
or by typing “Julia Settings” into the command palette or by pressing `Ctrl-J Ctr-,` or by going to Settings \> Packages \> julia-client.

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [December 6, 2018, 9:08am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/7 "2018-12-06T09:08:40Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [December 6, 2018, 9:16am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/8 "2018-12-06T09:16:24Z")

</div>

One question.  
if I want to hide the output of a line, I put semicolon at the end of a line in Julia REPL or Jupyter notebook. This doesnot seem to work in Juno. Any workaround?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [December 6, 2018, 9:19am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/9 "2018-12-06T09:19:27Z")

</div>

It does:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/b/bb123a006ae051c35f9cbaf1dcf744299b026384.png)

Again, this is the difference between printing to stdout and displaying a returned object. Same goes for the REPL:

```julia
julia> 1+1
2

julia> 1+1;

julia> print(1+1);
2

```

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [December 6, 2018, 9:26am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/10 "2018-12-06T09:26:31Z")

</div>

I get it. This happens only when the Result Display Mode is next to code and not otherwise.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [December 6, 2018, 9:35am UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/11 "2018-12-06T09:35:52Z")

</div>

Ok, there was a bug with the “Display results in the console” mode that caused the result to be displayed always (which is what you were getting at, I guess). Should be fixed with [this commit](https://github.com/JunoLab/Atom.jl/commit/f9bbf246bdc1764a69c6fe6357eeddb1e1dbe41d).

---

<div class="post-metadata">

**Author:** ![DShiu](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@DShiu](https://discourse.julialang.org/u/DShiu)\
**Post date:** [September 1, 2020, 3:54pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/12 "2020-09-01T15:54:59Z")

</div>

Maybe I am looking at the wrong place. Could you let me know where you find the “Result Display Mode” option?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/e/7ef0a80ccad89cbdae7acb1cbea663b63859778f.png)

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [September 1, 2020, 4:10pm UTC](https://discourse.julialang.org/t/change-output-destination-with-juno-main-document-vs-repl/18313/13 "2020-09-01T16:10:32Z")

</div>

Go to `Settings` \> `Packages` \> `julia-client` \> `UI Options`:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/3/93077e89dfd557216cf71f90f1734ebf05c93d48.png)
