# Not evaluating all cells unless I explicitly evaluate each one?

I'm running a Mathematica (version 8) notebook. In one of the first few cells, it is supposed to plot some data. It uses a couple functions that are defined in an above cell.

If I do Evaluation-> Evaluate Notebook (which should evaluate the whole notebook, starting from the top, right?), it goes through and seems to evaluate it (the bars at the right turn from highlighted to regular as it goes down the notebook), but it doesn't produce the plot, or several other results that should output to the screen (they don't have a semicolon).

However, if I go down from the top and manually hit shift+enter for each cell in order, it produces what it's supposed to.

Am I doing something dumb? What's going on?

Thanks!

-
What happens if you select all (command-A) and then enter? –  bill s Jan 17 '14 at 19:22
@bills, hi, I assume you mean shift+enter? I tried just enter and it did nothing. Doing ctrl+a and shift enter did the same thing doing "evaluate notebook" did. –  YungHummmma Jan 17 '14 at 19:29
That does sound unusual. Can you upload somewhere a notebook that shows the problem? You could use Dropbox if you're signed up or maybe ge.tt I can test it for you in v8. –  Szabolcs Jan 17 '14 at 19:30
@Szabolcs, thanks. Here it is, I've run just this much and it has the same issue. I hope the formatting hasn't been messed up too much: pastie.org/8643297 –  YungHummmma Jan 17 '14 at 19:34
@YungHummmma Remove Quit from the beginning and try again. Does it work now? –  Szabolcs Jan 17 '14 at 19:42

It turns out that you had Quit[] at the top of the notebook (as you mentioned in the comments). This quits the kernels and effectively cancels all evaluations that were queued by the front end when you clicked Evaluate Notebook.
Just make sure you won't evaluate that one cell containing Quit[].
SetOptions[\$FrontEnd, "ClearEvaluationQueueOnKernelQuit" -> False]

There is a way to fix it so that the notebook would behave the way you want it to. Using the trick on this page, you can set it so that Mathematica will evaluate the cell with the Quit command, then restart the kernel and evaluate the other cells you had selected. I did this a very long time ago and love it. –  Jason B Jan 17 '14 at 20:31