From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#17397: 24.4.50; REGRESSION: `temp-buffer-show-hook' is no longer invoked for `describe-variable' Date: Wed, 14 May 2014 09:06:50 +0200 Message-ID: <5373160A.3070604@gmx.at> References: <18354a80-fa76-43bd-a06b-7d2c4ccbbfd4@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1400051309 367 80.91.229.3 (14 May 2014 07:08:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 May 2014 07:08:29 +0000 (UTC) To: Drew Adams , 17397@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 14 09:08:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WkTIb-0004ay-4Y for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2014 09:08:21 +0200 Original-Received: from localhost ([::1]:49538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkTIa-0006Xq-MS for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2014 03:08:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkTIQ-0006We-E5 for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 03:08:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkTII-00035D-J0 for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 03:08:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkTII-000359-GW for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 03:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WkTIH-0004yO-RF for bug-gnu-emacs@gnu.org; Wed, 14 May 2014 03:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 May 2014 07:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17397-submit@debbugs.gnu.org id=B17397.140005123119030 (code B ref 17397); Wed, 14 May 2014 07:08:01 +0000 Original-Received: (at 17397) by debbugs.gnu.org; 14 May 2014 07:07:11 +0000 Original-Received: from localhost ([127.0.0.1]:34622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkTHS-0004wr-Tb for submit@debbugs.gnu.org; Wed, 14 May 2014 03:07:11 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:56788) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkTHP-0004wL-0L for 17397@debbugs.gnu.org; Wed, 14 May 2014 03:07:08 -0400 Original-Received: from [194.96.34.248] ([194.96.34.248]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M3u86-1X1j0w2sfC-00rVYG; Wed, 14 May 2014 09:07:00 +0200 In-Reply-To: X-Provags-ID: V03:K0:Bz3TuIcBHz3wn6shbA2toUUEsePd2GL88yKYKJyv2CPAshZuke2 BbH9CSiN2Uy63B3LXulGtIyfmoOniIomBEtD3cBAewQm78huTPywqDq12SPGOLmHk8z6nGG NzQjJTtLBMARguzgFTogMy90CiFf9NVuFL0bXFVhb/huXiM3RyQIGoPEGxckGuQVodomNrZ qiJo8BZFqtN3wmkvrVm1g== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89059 Archived-At: > To get *Help* to DTRT for the code or user that previously used > `temp-buffer-setup-hook' or `temp-buffer-show-hook, is it > appropriate to put the same things on `temp-buffer-window-setup-hook' > and `temp-buffer-window-show-hook' instead? Or will that maybe > have unwanted effects because `with-temp-buffer-window' is perhaps > used for more than just *Help*? Both `with-output-to-temp-buffer' and `with-temp-buffer-window' are and can be used for other things than displaying *Help*. > Not clear to me. And I find no help in the doc or NEWS - or in > this bug thread, so far. The manual says about `with-temp-buffer-window' that This macro uses the normal hooks `temp-buffer-window-setup-hook' and `temp-buffer-window-show-hook' in place of the analogous hooks run by `with-output-to-temp-buffer'. What else do you need? > Should I be adding `fit-frame-if-one-window' to `temp-buffer-window' > for Emacs 24.4, to get the effect it has in Emacs 24.3 (and prior) > by being on `temp-buffer-show-hook'? I suppose you want to add it to `temp-buffer-window-show-hook'. > If not, how to get the same effect? If yes, how to deal with other > possible uses of `with-temp-buffer-window', which have nothing to do > with *Help*? (In the case of `fit-frame-if-one-window', that would > probably not hurt anything, but the question is more general.) Emacs has a `temp-buffer-resize-mode' which is tied to temporary buffers and not to `help-mode'. To "deal with other possible uses" of temporary buffers, a function run by `temp-buffer-show-hook' or `temp-buffer-window-show-hook' should probably check whether the buffer is in help mode. In this regard nothing has changed wrt earlier version where a user removed `help-mode-setup' from `temp-buffer-setup-hook' and `help-mode-finish' from `temp-buffer-show-hook'. Maybe you could also use `help-mode-hook' to do something for help buffers exclusively and avoid other temporary buffers. > The existing doc is anyway wrong in some cases, AFAICT: The doc > string of `with-temp-buffer-window' says: > > This construct is similar to `with-output-to-temp-buffer' > but, neither runs `temp-buffer-setup-hook' which usually puts > the buffer in Help mode, nor `temp-buffer-show-function' (the > ACTION argument replaces this). What is wrong here? > And the doc string of `temp-buffer-setup-hook', likewise, says: > > This hook is normally set up with a function to put the buffer > in Help mode. This is still the case for the release version. IIRC Leo Liu changed it on the trunk so the doc-string should be probably updated there. > I don't get the impression that either of those statements is > true anymore. It seems like there is *no relation* anymore > between such temp-buffer things and Help mode. Furthermore, > grepping for `temp-buffer-setup-hook' in the Emacs sources > shows that it is not used for this at all anymore. The connection between temporary buffers and help mode is established by `with-help-window' which uses `with-temp-buffer-window'. martin