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-alist simplifications Date: Mon, 29 Aug 2011 21:04:25 +0200 Message-ID: <4E5BE2B9.9030307@gmx.at> References: <87mxgem09k.fsf@stupidchicken.com> <4E355D2C.40709@gmx.at> <87k4axzg7j.fsf@mail.jurta.org> <87oc092gy0.fsf@stupidchicken.com> <4E380897.5000406@gmx.at> <871ux2nsrw.fsf@stupidchicken.com> <4E3AA5DA.8030403@gmx.at> <87mxfnn414.fsf@stupidchicken.com> <4E3D41F2.8060801@gmx.at> <4E3FA812.3080009@gmx.at> <87zkjkb572.fsf@mail.jurta.org> <4E3FD5ED.5000206@gmx.at> <4E412E2D.90908@gmx.at> <4E422ECA.2020207@gmx.at> <4E43A253.9040404@gmx.at> <4E59F6D1.5060800@gmx.at> 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: dough.gmane.org 1314644688 18552 80.91.229.12 (29 Aug 2011 19:04:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2011 19:04:48 +0000 (UTC) Cc: Juri Linkov , Chong Yidong , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 29 21:04:43 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qy78T-0002qx-Jy for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2011 21:04:41 +0200 Original-Received: from localhost ([::1]:54142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy78T-0004Vr-4M for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2011 15:04:41 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy78R-0004VB-4H for emacs-devel@gnu.org; Mon, 29 Aug 2011 15:04:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy78Q-00033U-1i for emacs-devel@gnu.org; Mon, 29 Aug 2011 15:04:39 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:41130) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qy78P-00033Q-LF for emacs-devel@gnu.org; Mon, 29 Aug 2011 15:04:38 -0400 Original-Received: (qmail invoked by alias); 29 Aug 2011 19:04:30 -0000 Original-Received: from 62-47-37-120.adsl.highway.telekom.at (EHLO [62.47.37.120]) [62.47.37.120] by mail.gmx.net (mp007) with SMTP; 29 Aug 2011 21:04:30 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19Fu5gSNQBFP90Itna7bfcu3Bmlr9yICiUpVkiWOH nAV3/+bSjTN3KV 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.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:143636 Archived-At: > If it hurts don't do that: the way my proposal works indeed does not > lend itself to the kind of decomposition you've used in the current code. > > Until now there is no caller out there that specifies "I want to reuse > an existing window and I want it to be the LRU", and neither is there > a user out there that has a config that says "buffers names TOTO should > be displayed in an existing window and should use the largest window". > So it's not a real problem. So when we write a function `display-buffer-near-minibuffer' and want to reuse the bottom-most window we can't decompose? >> If `user-action' specifies >> '(display-buffer-pop-up-window . ((window . largest))) >> `display-buffer' will try to split the lru window. > > That indicates a name conflict, i.e. a misfeature in your choice of > parameter names. IIRC it was Juri's idea to unify keys this way. Good to know that it's a misfeature. > Just like different programming languages end up favoring different > coding styles (even though most programming languages are fundamentally > very similar), my buffer-display-alist is sufficiently different from > yours that it will favor a different kind of decomposition than the > one you've currently implemented. Already in Emacs 23 we had three basic functions to find a window for `display-buffer': `window--reuse-window', `window--pop-up-window' and `window--pop-up-frame'. These are the basic building blocks and whatever we want to do on top will always boil down to calling some variant of these. > - the functionality of Emacs-23 (i.e. mostly same-frame, same-window, > other-window, other-frame, dedicated-or-not, existing-window) so as to > be able to mark the various old config vars as obsolete. Without offering anything people can customize instead but a single option called `display-buffer-alist' to choose one of these functions? Bold ;-) martin