GNU bug report logs -
#8368
24.0.50; "temp" means "help" - rename or at least document
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Mon, 28 Mar 2011 16:40:02 UTC
Severity: wishlist
Found in version 24.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #50 received at 8368 <at> debbugs.gnu.org (full text, mbox):
>> You don't have to remove and re-add any hooks. It's
>> sufficient to turn off help mode in the body of
>> `with-output-to-temp-buffer'. Similarly,
>> if you don't want to run `completion-list-mode-finish', turn off
>> `completion-list-mode' in the buffer.
>
> Sufficient? That sounds like more work, not less. Why turn help mode etc. on
> automatically and then turn it off again. Why not just remove the hook so it
> does not get turned on?
Because it's non-trivial to "just" do that. We have to go through all
users of `with-output-to-temp-buffer' and check whether they want to
turn on help mode or not. I don't have the slightest idea whether, for
example, the calls in ada-xref.el require activating help mode or not.
> I'm probably missing something in what you're
> suggesting.
No. But you earlier said that
> While waiting for that, users have to do something like this, just to get rid of
> the *Help*-imposed stuff:
>
> (defmacro with-output-to-plain-temp-buffer (buf &rest body)
> "Like `with-output-to-temp-buffer', but with no *Help* navigation stuff."
> `(unwind-protect
> (progn
> (remove-hook 'temp-buffer-setup-hook 'help-mode-setup)
> (remove-hook 'temp-buffer-show-hook 'help-mode-finish)
> (with-output-to-temp-buffer ,buf ,@body))
> (add-hook 'temp-buffer-setup-hook 'help-mode-setup)
> (add-hook 'temp-buffer-show-hook 'help-mode-finish)))
and I simply explained that there's an easier way to achieve what you
want. Obviously, dealing with `temp-buffer-show-hook' in
`with-output-to-plain-temp-buffer' isn't necessary either if you don't
run `help-mode-setup' before.
martin
This bug report was last modified 5 years and 303 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.