WolframResearch / WolframLanguageForJupyter

Wolfram Language kernel for Jupyter notebooks
MIT License
1.05k stars 126 forks source link

Begin[] / End[] do not take effect within a single cell #20

Closed szhorvat closed 5 years ago

szhorvat commented 5 years ago

Try evaluating the following in a single cell:

Begin["foo`"]
Context[xyz]
End[]

The expected output of Context[xyz] is foo`. This would be consistent with how the notebook interface and the command line interface work.

If we split the three lines across cells, then everything is fine.

image

cc-wr commented 5 years ago

Currently, as soon as a symbol is loaded into the kernel, even before the input line it is in has been evaluated, a context is imprinted on it. I imagine this is the cause of this issue.

I will add a fix that loads an input line only after the previous input line has actually been evaluated.

cc-wr commented 5 years ago

You may want to check out 34084b057d8f4b366cd4132569dc360e5e2c0acb to see if it fixes this issue for you. (It does for me.)

cc-wr commented 5 years ago

You may want to check out 34084b0 to see if it fixes this issue for you. (It does for me.)

See #46 now.

cc-wr commented 5 years ago

This should be resolved in master.