[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36588: Unable to revert M-x apropos help buffer

From: Basil L. Contovounesios
Subject: bug#36588: Unable to revert M-x apropos help buffer
Date: Mon, 05 Aug 2019 01:45:53 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

tags 36588 fixed
close 36588 27.1

Stefan Kangas <address@hidden> writes:

> Not familiar with this code, so I can't speak to your solution.  I can confirm
> it fixes the problem though.  Thanks for looking at it so promptly.

Thanks, I've now pushed the patch to master[1] and am therefore closing
this report.

[1]: Support reverting Apropos buffers (bug#36588)
4cd41ba8de 2019-08-05 01:19:51 +0300

> I've attached a small patch with a test for this.

Thanks, but I'm not sure it's applicable here; see below.

> From 562d2622048be8ac5509d8ccd4b9fd18244fc3a4 Mon Sep 17 00:00:00 2001
> From: Stefan Kangas <address@hidden>
> Date: Fri, 12 Jul 2019 06:57:29 +0200
> Subject: [PATCH] * test/lisp/apropos-tests.el: New file.


> +(ert-deftest apropos-tests-revert-buffer ()
> +  (with-temp-buffer
> +    (apropos "foo")
> +    (revert-buffer nil t)
> +    (should (looking-at "Type RET on a type label"))))

[Nit: Use looking-at-p unless subsequently using the match data.]

I don't currently see a clean way to test this behaviour
non-interactively, as the apropos command takes over the hard-coded
*Apropos* buffer and can pop up new windows and frames (which also
renders the call to with-temp-buffer a no-op, AFAICT).  This is far too
intrusive for the ERT case.

Alternatives include refactoring apropos.el to make it more testable,
and adding manual tests under test/manual/, but either of these deserves
its own bug report.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]