Suppose there is an error during LaTeX compilation, and then the user immediate previews again. We should show the same error again.
This doesn't happen since adding a "show output anyway" button at 09700d5b. The reason for this is that before, we used to remove output files on error. This way, in the above case to know whether to show the error again, we just would check whether there was a PDF file. Now, however, we keep PDF files around even if there is an error (in case the user wants to use the "show output anyway" button). To fix this, I propose to store the error status in a buffer variable. Then on preview, if there is already a valid cached PDF, we can just check log_status and process it accordingly. Any thoughts? Scott