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.



<< 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 ?


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?

| improve this answer | |

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