From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: with-output-to-temp-buffer and help-mode Date: Fri, 25 Jul 2014 08:13:47 -0700 (PDT) Message-ID: References: <1yppgtua5n.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1406301256 19865 80.91.229.3 (25 Jul 2014 15:14:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jul 2014 15:14:16 +0000 (UTC) To: Glenn Morris , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 25 17:14:10 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XAhCE-0003Dh-7N for ged-emacs-devel@m.gmane.org; Fri, 25 Jul 2014 17:14:10 +0200 Original-Received: from localhost ([::1]:55364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAhCD-0006Qi-PS for ged-emacs-devel@m.gmane.org; Fri, 25 Jul 2014 11:14:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAhC4-0006QJ-9o for emacs-devel@gnu.org; Fri, 25 Jul 2014 11:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAhBw-0001bs-2G for emacs-devel@gnu.org; Fri, 25 Jul 2014 11:14:00 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:31257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAhBv-0001bg-RK; Fri, 25 Jul 2014 11:13:51 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s6PFDonW028321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 Jul 2014 15:13:51 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6PFDnsj026425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Jul 2014 15:13:49 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6PFDnRp024484; Fri, 25 Jul 2014 15:13:49 GMT In-Reply-To: <1yppgtua5n.fsf@fencepost.gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173142 Archived-At: > with-output-to-temp-buffer was changed to no longer put the buffer in > help-mode. This change makes no sense to me +1 > - can someone explain the logic? Otherwise I'm thinking the change > should just be reverted. >=20 > I did ask in http://debbugs.gnu.org/16038#104, but I haven't seen a > proper explanation. +1 > The elisp manual documents the use of help-mode (since at least 1999): >=20 > This function executes the forms in BODY while arranging to insert > any output they print into the buffer named BUFFER-NAME, which is > first created if necessary, and put into Help mode. > [...] > If the forms in BODY do not change the major mode in the output > buffer, so that it is still Help mode at the end of their > execution, then `with-output-to-temp-buffer' makes this buffer > read-only at the end, and also scans it for function and variable > names to make them into clickable cross-references. >=20 > I agree that: > 1) the fact there is no "help" in the name is unfortunate. > 2) the fact that help-mode is not mentioned in the doc-string is > unfortunate. > 3) the way this was implemented (via hooks) was unfortunate. 3 x (+1) > However: >=20 > Many (most?) uses of the thing rely on the output being in help mode. > See eg http://debbugs.gnu.org/17966 . > There are ~ 223 uses of with-output-to-temp-buffer in lisp/. > As a first simple test, the string "help" appears on the same line as 76 > of them. Yes. And what is true of the Emacs source code is also true of 3rd-party code. `with-output-to-temp-buffer' is used a lot, and its uses expect and depend on it using help-mode. This help behavior is longstanding - many, many moon. It should not just be removed willy nilly overnight. The name (with "temp" and without "help") is unfortunate, but the way to fix a faulty name is not to change the code to fit the name but to change the name to fit the code (AND to keep the old name as an alias, and deprecate it). > Nobody shows any signs of fixing all those uses, or even documenting > this (incompatible) change in NEWS. >=20 > So I think this should just be reverted. +1 (Even though it will mean undoing workaround code I added in lots of places to accommodate this change.)