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: display-buffer cleverness - how to tame? Date: Mon, 04 May 2009 18:41:04 +0200 Message-ID: <49FF1AA0.9080601@gmx.at> References: <000c01c9cc8b$ba796c50$0200a8c0@us.oracle.com> <49FEA973.70705@gmx.at> <002a01c9ccc6$2221c840$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1241455404 19749 80.91.229.12 (4 May 2009 16:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 May 2009 16:43:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 04 18:43:14 2009 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.50) id 1M11G6-0002Vl-9p for ged-emacs-devel@m.gmane.org; Mon, 04 May 2009 18:43:14 +0200 Original-Received: from localhost ([127.0.0.1]:44745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M11G5-00064y-Pj for ged-emacs-devel@m.gmane.org; Mon, 04 May 2009 12:43:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M11Fb-0005pW-Cp for emacs-devel@gnu.org; Mon, 04 May 2009 12:42:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M11FW-0005nt-Cw for emacs-devel@gnu.org; Mon, 04 May 2009 12:42:42 -0400 Original-Received: from [199.232.76.173] (port=56069 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M11FW-0005nl-6G for emacs-devel@gnu.org; Mon, 04 May 2009 12:42:38 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:45729) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M11FV-0007FB-EV for emacs-devel@gnu.org; Mon, 04 May 2009 12:42:37 -0400 Original-Received: (qmail invoked by alias); 04 May 2009 16:42:35 -0000 Original-Received: from 62-47-50-143.adsl.highway.telekom.at (EHLO [62.47.50.143]) [62.47.50.143] by mail.gmx.net (mp022) with SMTP; 04 May 2009 18:42:35 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/BPJJPVo/B/L0nn1z8s7SC+4K+lB1hgaPHHwAND2 UXv0AutghlzhKY User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <002a01c9ccc6$2221c840$0200a8c0@us.oracle.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.62 X-detected-operating-system: by monty-python.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:110643 Archived-At: > It's a joke, right? No Drew, it's serious. > Emacs adding DWIM now means that if you want the simple, > straightforward behavior of old you need to write it yourself? It's not about adding DWIM. Let's have a look at "the simple, straightforward behavior of old": You apparently have a frame with two side-by-side windows and `pop-up-frames' bound to nil (IIRC `pop-up-frames' is usually non-nil on your Emacs). The left window is the larger one and the right window the least recently used one. Emacs 22 first tries to split the larger (left) window and fails to do so because the window is not full-width. Then Emacs tries to split the least recently used (right) one and succeeds. I suppose you were not aware of this since otherwise you wouldn't have written (in your first mail on this subject) "the problem seems to be that display-buffer now tries to split the largest window" where "now" apparently means "Emacs 23". The difference is that with Emacs 23 `display-buffer' tries to split the largest window _and_ succeeds in doing so. So basically you wrote some code that (1) relied on some undocumented behavior of `display-buffer', and (2) would have failed to DTRT with more than two windows on your frame or the window on the right not being the least recently used one. > I'd sooner copy the Emacs 22 `display-buffer' code and just use that, except > that it's in C. ;-) You could try getting the version distributed with XEmacs. It's in Elisp and should still exhibit the old behavior ;-) > You are not making it easier for users (which includes Emacs-Lisp users)... The present code is more fully documented. So I hopefully made it easier for users (which includes Emacs-Lisp users) to complain ... martin