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: Wed, 02 Mar 2011 20:56:58 +0100 Message-ID: <4D6EA10A.7010000@gmx.at> References: <4D6B6AA4.8090008@gmx.at> <4D6BD6EA.4010000@gmx.at> <87mxlg57hs.fsf@stupidchicken.com> <83wrkklzcd.fsf@gnu.org> <87ipw4aq3x.fsf@stupidchicken.com> <8762s32854.fsf@gnu.org> <87ipw3ik43.fsf@stupidchicken.com> <83vd02y8qq.fsf@gnu.org> <4D6DFB3D.1040306@gmx.at> <837hchxt17.fsf@gnu.org> 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 1299095834 31369 80.91.229.12 (2 Mar 2011 19:57:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2011 19:57:14 +0000 (UTC) Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 02 20:57:09 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 1PusAX-0000d3-Jc for ged-emacs-devel@m.gmane.org; Wed, 02 Mar 2011 20:57:09 +0100 Original-Received: from localhost ([127.0.0.1]:54991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PusAX-0005TP-4X for ged-emacs-devel@m.gmane.org; Wed, 02 Mar 2011 14:57:09 -0500 Original-Received: from [140.186.70.92] (port=38907 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PusAS-0005TJ-Rp for emacs-devel@gnu.org; Wed, 02 Mar 2011 14:57:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PusAR-00021y-P0 for emacs-devel@gnu.org; Wed, 02 Mar 2011 14:57:04 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:50288) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PusAR-00021h-Co for emacs-devel@gnu.org; Wed, 02 Mar 2011 14:57:03 -0500 Original-Received: (qmail invoked by alias); 02 Mar 2011 19:57:02 -0000 Original-Received: from 62-47-36-185.adsl.highway.telekom.at (EHLO [62.47.36.185]) [62.47.36.185] by mail.gmx.net (mp048) with SMTP; 02 Mar 2011 20:57:02 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19Y6BdAxU5YSHjDt2VTC1ZUt6QANHnPY1B1T2ckry aOoIWmZs/3+aoA User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <837hchxt17.fsf@gnu.org> 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.22 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:136727 Archived-At: >> > Would it help to have a primitive that returns the width in pixels >> > that a given buffer substring would take on the screen? >> >> Not really. > > Why not? Especially since you go one explaining why it _would_ be > helpful ;-) I meant it would not help in the case at hand. It would be helpful in many other cases ;-) >> But in general, a primitive that returned the displayed pixel >> height/width of a substring of any buffer line for some given window >> would be great. > > What's a window got to do with this? How can a window affect display > of a buffer substring? What I meant was the size in pixel of the displayed text. If we have an overlay with a window property plus other text properties - suppose someone wants to look at the plain buffer text in one window and the same text outlined or magnified in another window - then we might get different displayed sizes for the same "buffer substring". >> Actually, it would be nice if redisplay could cache these values on >> demand for each line it (virtually) displayed. > > What for? Because redisplay is costly and running such a function can amount to doing a redisplay. If I had such a function, I could synchronize the text of two side-by-side windows in the presence of characters of different heights. This would be useful for side-by-side displayed diff-windows or for showing line numbers in a side window. In such cases a cache would avoid to run what is essentially the same function twice over the entire text displayed in a window. martin