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: shrink-window-if-larger-than-buffer in VC-diff Date: Fri, 20 Aug 2010 11:06:33 +0200 Message-ID: <4C6E4599.6090503@gmx.at> References: <87aaoo7pmj.fsf@stupidchicken.com> <87iq3bs168.fsf@stupidchicken.com> <87mxsjy4e2.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282295219 24626 80.91.229.12 (20 Aug 2010 09:06:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Aug 2010 09:06:59 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 20 11:06:58 2010 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 1OmNYs-0007Fl-0i for ged-emacs-devel@m.gmane.org; Fri, 20 Aug 2010 11:06:54 +0200 Original-Received: from localhost ([127.0.0.1]:41307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmNYr-0003QU-2W for ged-emacs-devel@m.gmane.org; Fri, 20 Aug 2010 05:06:53 -0400 Original-Received: from [140.186.70.92] (port=54531 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmNYj-0003PT-8a for emacs-devel@gnu.org; Fri, 20 Aug 2010 05:06:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmNYg-0000uu-Ou for emacs-devel@gnu.org; Fri, 20 Aug 2010 05:06:45 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:53653 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OmNYg-0000sF-BQ for emacs-devel@gnu.org; Fri, 20 Aug 2010 05:06:42 -0400 Original-Received: (qmail invoked by alias); 20 Aug 2010 09:06:38 -0000 Original-Received: from 62-47-51-205.adsl.highway.telekom.at (EHLO [62.47.51.205]) [62.47.51.205] by mail.gmx.net (mp026) with SMTP; 20 Aug 2010 11:06:38 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19BztMllWhBqrYmh4hbJWb/2s7Yf0h3p0lIosIoOn Pygof5H4y2F+Ny User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87mxsjy4e2.fsf@stupidchicken.com> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:128905 Archived-At: > Here's a possible implementation, which replaces even-window-heights > with a new option `resize-windows-for-display'. The value `fit' says to > resize the displayed/popped windows. What do you think? How is this option supposed to interact with `temp-buffer-resize-mode'? The latter, if enabled, will probably always override the option so such interaction should be somehow described in the doc-string(s). But I'm not quite sure whether using two similar approaches for the same problem is a good idea in the first place. I'd call functions like `fit-window-to-buffer' and `shrink-window-if-larger-than-buffer' only internally. The user interface should be provided by one mode or buffer local variable which also makes sure that any window displaying such a buffer gets adjusted when other windows or the frame change size. > ! (let ((resize-windows-for-display nil)) > ! (pop-to-buffer (current-buffer))) Here you explicitly override the user option - is that intentional? martin