From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: with-output-to-temp-buffer and help-mode Date: Fri, 25 Jul 2014 21:39:39 -0400 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 X-Trace: ger.gmane.org 1406338791 18357 80.91.229.3 (26 Jul 2014 01:39:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jul 2014 01:39:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Liu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 26 03:39:46 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 1XAqxd-0005hb-T9 for ged-emacs-devel@m.gmane.org; Sat, 26 Jul 2014 03:39:46 +0200 Original-Received: from localhost ([::1]:57448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAqxd-0002vN-Hk for ged-emacs-devel@m.gmane.org; Fri, 25 Jul 2014 21:39:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAqxZ-0002v5-MP for emacs-devel@gnu.org; Fri, 25 Jul 2014 21:39:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAqxY-0004IX-Hk for emacs-devel@gnu.org; Fri, 25 Jul 2014 21:39:41 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAqxY-0004IS-Eo for emacs-devel@gnu.org; Fri, 25 Jul 2014 21:39:40 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XAqxX-0005J1-I5; Fri, 25 Jul 2014 21:39:39 -0400 X-Spook: airframe Bin Laden KGB basement smuggle AUTODIN Lon X-Ran: _]h"$su~z(K6D&zUa'JlQEB{N-`\FoNzX[*P*%:h&b9j#!!`|[dc":h%xU(qzZmTWr<,?X X-Hue: magenta X-Attribution: GM In-Reply-To: (Leo Liu's message of "Fri, 25 Jul 2014 17:06:10 +0800") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:173161 Archived-At: Leo Liu wrote: > See Martin's comment in > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16038#14, there seems to be > problems either way. His comments relate to with-temp-buffer-window, which was a new thing he introduced. This is normally how it works. If you don't like existing long-standing behaviour, you introduce a new thing that behaves as you want, and deprecate the old thing. You don't just silently change the old thing to do something else. As he said in the very message you cite: I'd rather get rid of `with-output-to-temp-buffer' ;-) If you look into our mail archives, you should find a couple of complaints about `with-output-to-temp-buffer' putting the buffer in `help-mode' (via `temp-buffer-setup-hook') and the like. I tried to avoid these when I wrote `with-temp-buffer-window'. Assume two applications A and B: A expects `with-output-to-temp-buffer' to put the buffer in `help-mode'. B wants to avoid that the buffer is put in `help-mode'. I can offer B to use `with-temp-buffer-window' instead while A can continue to work as usual. Eventually I'd like A to use `with-temp-buffer-window' too and put the buffer in `help-mode' itself. But there were too many `with-output-to-temp-buffer' calls in the code base and I was not able to look into them. That would be fine by me: Deprecate with-output-to-temp-buffer and its ugly implementation, and use with-temp-buffer-window + an explicit help call. But leave the old with-output-to-temp-buffer alone. > Note also temp-buffer-setup-hook is part of the public hooks of > with-output-to-temp-buffer so the macro makes no guarantee it will be in > Help mode. I.e. it is permissible for a user to have (add-hook > 'temp-buffer-setup-hook 'fancy-help-mode t) As I said, I agree the way this was implemented was unfortunate. So deprecate it and introduce something better. > The more important reason is we have variants of those macros and it is > time to consolidate them. I am just completely failing to understand your logic here. But no-one else seems to care (can't say I blame them from being put off this discussion).