Subject: bug#25158: [PATCH] A better way for test code to access messages

From: Michael Albinus <[email-masked]>
Date: Sat, 10 Dec 2016 20:27:38 +0100

Gemini Lasswell <[email-masked]> writes:

> Michael, in modifying autorevert-tests.el, at the start of
> auto-revert-test02-auto-revert-deleted-file, *Messages* was narrowed,
> and then narrowed again before the call to auto-revert--wait-for-revert,
> so it looked safe to delete the first narrowing instead of replacing it
> with ert-with-message-capture. Let me know if I've missed something
> there.

In autorevert-tests.el, the *Messages* buffer is narrowed systematically
prior any write-region call. I don't remember the details, but AFAIR
there were some other messages which have poisoned the tests.

I let it to you to change wherever you feel it is necessary. Tests will
show whether there are undesired side effects.

Best regards, Michael.