GNU bug report logs -
#36588
Unable to revert M-x apropos help buffer
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Thu, 11 Jul 2019 03:33:01 UTC
Severity: minor
Tags: fixed, patch
Fixed in version 27.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Basil L. Contovounesios <contovob <at> tcd.ie> writes:
> This is because Apropos buffers are set up in apropos-print using
> with-output-to-temp-buffer, which by default calls help-mode, which sets
> revert-buffer-function permanently-locally to help-mode-revert-buffer.
>
> [Aside: Why is revert-buffer-function permanent-local?]
>
> help-mode-revert-buffer expects the command which generated the Help
> buffer to have previously called help-setup-xref. This should be
> possible to do in Apropos, but it would be quite ugly as help-setup-xref
> needs to be called with the Help buffer current, so Apropos commands
> would need to set their own version of help-xref-stack-item before
> apropos-print performs the help-setup-xref dance. Besides, Apropos
> buffers are not (currently) really Help buffers.
>
> Instead, I propose emulating a simpler version of help-setup-xref
> specific to Apropos:
>
>
> I don't consider this duplication because, unless Apropos were
> completely refactored, setting something like apropos--current would be
> necessary either way. This has the added perk of not coupling Apropos
> with Help any more than it currently needs to be.
>
> WDYT?
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.
I've attached a small patch with a test for this.
Thanks,
Stefan Kangas
[0001-test-lisp-apropos-tests.el-New-file.patch (application/octet-stream, attachment)]
This bug report was last modified 5 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.