From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list-colors-display): Use with-help-window (Bug#8048). Date: Mon, 28 Feb 2011 18:10:02 +0100 Message-ID: <4D6BD6EA.4010000@gmx.at> References: <4D6B6AA4.8090008@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1298913062 6138 80.91.229.12 (28 Feb 2011 17:11:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Feb 2011 17:11:02 +0000 (UTC) Cc: Juanma Barranquero , Chong Yidong , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 28 18:10:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pu6cY-0003an-1H for ged-emacs-devel@m.gmane.org; Mon, 28 Feb 2011 18:10:57 +0100 Original-Received: from localhost ([127.0.0.1]:45184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu6cM-0000cw-GC for ged-emacs-devel@m.gmane.org; Mon, 28 Feb 2011 12:10:42 -0500 Original-Received: from [140.186.70.92] (port=56916 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu6c7-0000Rq-Mn for emacs-devel@gnu.org; Mon, 28 Feb 2011 12:10:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pu6bn-0000Zy-IO for emacs-devel@gnu.org; Mon, 28 Feb 2011 12:10:08 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:49023) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Pu6bn-0000ZA-4X for emacs-devel@gnu.org; Mon, 28 Feb 2011 12:10:07 -0500 Original-Received: (qmail invoked by alias); 28 Feb 2011 17:10:04 -0000 Original-Received: from 62-47-57-191.adsl.highway.telekom.at (EHLO [62.47.57.191]) [62.47.57.191] by mail.gmx.net (mp053) with SMTP; 28 Feb 2011 18:10:04 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19U5+YOu2xUh7p3SbtCvaP+m9Ct9/tLvJ43UmFfba Tt6hXGZ+UF+Tcu User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.165.64.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136606 Archived-At: > The above should be changed so the whole code is surrounded by > with-help-window. That's easier said than done :-( >> Unfortunately, we can't fill the buffer _before_ calling >> `with-help-window' because, as the comment above indicates, >> `list-colors-print' wants to know the width of the window _before_ >> filling the buffer. > > That's a common need, so with-help-window should display the buffer > before running the code. Hmmm... This means that either `with-help-window' can no longer rely on `with-output-to-temp-buffer' or the latter has to be changed. Neither of these appear overly difficult but the interaction with internal_with_output_to_temp_buffer would have to be examined. And we should keep in mind the following: If the decision whether a window for displaying the buffer can be split off from an existing window should be based on the number of lines of the buffer, only the current solution works. So if you could provide some pointers wrt to the "common need" we might be able to judge which approach is preferable. > Of course, another way to look at it is that the buffer's content should > be independent from the window, and if it needs to be displayed > differently according to the window size, then this should be done > within the redisplay so that if that same buffer is displayed in several > windows, they all look "right". But the current redisplay features > probably aren't sufficient for that. It's merely that code like `list-colors-print' would get confused. We'd have to run it for every window where the buffer is shown so an overlay with a window property inserting the necessary amount of spaces would be needed. martin