1
$\begingroup$

This question already has an answer here:

I have put all the function I use regularly in a package.

At the beginning of my notebook I have a section containing the following stuff.

Quit[]

Off[SixJSymbol::tri]

<< fonctionsGenerales`

When I run my notebook by evaluation > evaluate notebook, all the functions of my package fonctionsGenerales are unknown by my notebook.

But when I execute line by line this first section, and then I execute the rest of the code normally, everything works fine.

Why by doing "evaluate notebook", my notebook seems to not see the functions in my package ?

$\endgroup$

marked as duplicate by Mr.Wizard Jun 1 '17 at 22:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4
$\begingroup$

When you use Evaluate Notebook all expressions in your notebook are added to the evaluation queue. But the Quit[] command by default removes all items from this queue. So nothing gets evaluated.

To change the default behaviour you can use the following command:

SetOptions[$FrontEnd, "ClearEvaluationQueueOnKernelQuit" -> False]

See also:

Self-restarting MathKernel - is it possible in Mathematica?

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.