From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#8368: 24.0.50; "temp" means "help" - rename or at least document Date: Fri, 27 Apr 2012 17:15:53 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1335572227 11121 80.91.229.3 (28 Apr 2012 00:17:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Apr 2012 00:17:07 +0000 (UTC) Cc: 8368@debbugs.gnu.org, rms@gnu.org To: "'Stefan Monnier'" , "'Lars Magne Ingebrigtsen'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 28 02:17:06 2012 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 1SNvLS-0006SH-0r for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Apr 2012 02:17:02 +0200 Original-Received: from localhost ([::1]:56715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNvLR-0000KF-BM for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Apr 2012 20:17:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNvLO-0000K9-7w for bug-gnu-emacs@gnu.org; Fri, 27 Apr 2012 20:16:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNvLM-0007wM-Cd for bug-gnu-emacs@gnu.org; Fri, 27 Apr 2012 20:16:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNvLM-0007wI-8m for bug-gnu-emacs@gnu.org; Fri, 27 Apr 2012 20:16:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SNvMQ-0002Zt-Ds for bug-gnu-emacs@gnu.org; Fri, 27 Apr 2012 20:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Apr 2012 00:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8368 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8368-submit@debbugs.gnu.org id=B8368.13355722399857 (code B ref 8368); Sat, 28 Apr 2012 00:18:02 +0000 Original-Received: (at 8368) by debbugs.gnu.org; 28 Apr 2012 00:17:19 +0000 Original-Received: from localhost ([127.0.0.1]:55907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNvLi-0002Yv-VG for submit@debbugs.gnu.org; Fri, 27 Apr 2012 20:17:19 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:23269) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNvLg-0002Yg-2s for 8368@debbugs.gnu.org; Fri, 27 Apr 2012 20:17:17 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q3S0G0SO025334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 28 Apr 2012 00:16:00 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q3S0FwWK027965 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Apr 2012 00:15:59 GMT Original-Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q3S0Fw5F021574; Fri, 27 Apr 2012 19:15:58 -0500 Original-Received: from dradamslap1 (/10.159.177.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 Apr 2012 17:15:57 -0700 X-Mailer: Microsoft Office Outlook 11 In-reply-to: Thread-Index: AcxwP3SyO1G1jqkdRKWu3O9UyDZHJC0kDUNA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:59576 Archived-At: > From: Stefan Monnier Sent: Saturday, September 10, 2011 9:58 PM > Lars> There's been no response in two months. Lars> I think the following is a bug: Lars> ;; This makes `with-output-to-temp-buffer' buffers use `help-mode'. Lars> (add-hook 'temp-buffer-setup-hook 'help-mode-setup) Lars> (add-hook 'temp-buffer-show-hook 'help-mode-finish) Lars> Would removing these be a good idea? > > Not at this stage of the development, no. So now it's been over a year since the bug was filed. Can't the help mode code add those hooks only for the use of *Help* and other help-mode buffers? Why should all uses of `with-output-to-temp-buffer' end up running those hook functions that are, after all, specific to help mode? Can we please move forward on fixing this bug? There is lots of stuff in a "temp" buffer now that has nothing to do with a temporary buffer. emacs -Q (setq debug-on-error t) (defun foo () "..." (with-output-to-temp-buffer "*TEMP*" (princ "FOOOOO\n-----\n\n"))) (foo) C-x b *TEMP* TAB Debugger entered--Lisp error: (error "No buttons!") signal(error ("No buttons!")) error("No buttons!") forward-button(1 1 1) call-interactively(forward-button nil nil) No f___ing buttons? WTF? Who cares? Look at all the keys bound now in a "temporary" buffer (below). How many of them have to do with a temporary display of something other than outright *Help*? The only keys I can think of that might generally make sense for a temporary buffer mode are SPC, DEL, <, >, ?, h, q, maybe z (but why was `z' chosen to kill?), maybe the digits and -, and maybe (if `revert-buffer-function' says so) g. All of the special help link and navigation commands should be reserved for a help mode that is _derived_ from a (minimal) temporary buffer mode. 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))) It makes no more sense for *Help* to have co-opted temporary buffer display than it would have made for Info to have co-opted it. Dunno how we ever went down this road. key binding --- ------- C-c Prefix Command TAB forward-button RET help-follow ESC Prefix Command SPC scroll-up-command - negative-argument 0 .. 9 digit-argument < beginning-of-buffer > end-of-buffer ? describe-mode g revert-buffer h describe-mode q quit-window z kill-this-buffer DEL scroll-down-command backward-button help-follow-mouse Prefix Command C-c C-b help-go-back C-c C-c help-follow-symbol C-c C-f help-go-forward M-TAB backward-button