# Juno - information of current working module

**URL:** <https://discourse.julialang.org/t/juno-information-of-current-working-module/30409>\
**Category:** New to Julia\
**Tags:** juno\
**Created:** [October 28, 2019, 4:43pm UTC](https://discourse.julialang.org/t/juno-information-of-current-working-module/30409 "2019-10-28T16:43:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulJaval](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@PaulJaval](https://discourse.julialang.org/u/PaulJaval)\
**Post date:** [October 28, 2019, 4:43pm UTC](https://discourse.julialang.org/t/juno-information-of-current-working-module/30409/1 "2019-10-28T16:43:20Z")

</div>

Hi everyone,  
I’m working with Juno 0.3.0, and my question is on knowing which module we are currently working in.

Starting up the REPL in Juno sets me in the “Main” module, and my current version of Julia (1.2)

 ![Capture_3](https://global.discourse-cdn.com/julialang/original/3X/0/4/041d1e82c726a432dc37b59b87dfc96a708887e9.jpeg)

Now when I generate a new package called Example, here is what happens:

1. before activating the Example environment, I am still in the Main one, which is as expected.

 ![Capture_7](https://global.discourse-cdn.com/julialang/original/3X/7/1/71b60abf752ded717688f89e4358a414fc68e9bf.jpeg)

1. after activating the Example environment

 ![Capture_6](https://global.discourse-cdn.com/julialang/original/3X/a/8/a8c061303b177739a37e01a41677b13554a80ae4.jpeg)

In all of these screenshots, my cursor was at the end of line 3 of example.jl  
This has some importance as when I set my cursor in the REPL, Juno says I am always working the Main module, independently of the activated environment:

 ![Capture_5](https://global.discourse-cdn.com/julialang/original/3X/c/4/c49b4da78e5db9eafbedaa810b19fed4e56994ec.jpeg)

What I was expecting after activating the Example environment: see “Example” written at the bottom right corner of Juno, and not Main/Example. About Juno always showing that we are in the Main environment when my cursor in the REPL, I am also unsure about why this is the case.

This might have to do with the following question: can we leave the “Main” module?

Also, I might use “environment” and “module” words inappropriately!

Thanks for any help!

---

<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:** [October 28, 2019, 5:07pm UTC](https://discourse.julialang.org/t/juno-information-of-current-working-module/30409/2 "2019-10-28T17:07:24Z")

</div>

You’re confusing _modules_ and _environments_.

The _module_ Juno displays dictates _where_ your code is evaluated. If it’s e.g. set to `Base` then you have unqualified access to `Base`s internals and can overwrite bindings at will. This is very powerful because you don’t need to reload your module for every little edit and can instead make incremental changes.

Environments on the other hand change what _packages_ are loaded (or even available): If you `pkg> activate Example`, like in your screenshots, then all package operations will modify that local environment and you will only be able to load packages that are defined as dependencies to `Example`.

The little indicator in the lower right corner only cares about the former – try browsing through some code in Base or in a stdlib or in your favourite package and observe how it changes (the fact that we’re detecting `Main/Example` instead of `Example` in your case is kinda unfortunate and should be fixed). You can change what module Juno is evaluating into by either clicking the module indicator or using the `Julia Client: Set Working Module` command in the command pane. The REPL is set to `Main` by default, but `Follow Editor` is also very useful.

---

<div class="post-metadata">

**Author:** ![PaulJaval](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@PaulJaval](https://discourse.julialang.org/u/PaulJaval)\
**Post date:** [October 28, 2019, 10:22pm UTC](https://discourse.julialang.org/t/juno-information-of-current-working-module/30409/3 "2019-10-28T22:22:48Z")

</div>

Thank your for your answer! Indeed, I am confusing both  
So being “current working module” is a possible status for a module and being “current environment” is a possible status for a package right?

In fact in the bottom right corner “Main/Example” appears when I’m on the Example.jl file, but “Example” appears when I’m on another file .jl in Example/src. So apart from when I am on Example.jl, it makes sense.
