From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: Some question about display-buffer action functions Date: Mon, 30 Jan 2012 22:26:43 +0100 Message-ID: References: <4F25829F.8000104@gmx.at> <4F266F3D.6030105@gmx.at> <4F26DD9D.1080101@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327958852 7521 80.91.229.3 (30 Jan 2012 21:27:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2012 21:27:32 +0000 (UTC) Cc: Emacs developers To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 30 22:27:31 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rryl8-0006j0-Oc for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2012 22:27:30 +0100 Original-Received: from localhost ([::1]:33555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rryl7-0007MC-Tm for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2012 16:27:29 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rryl4-0007M4-Mr for emacs-devel@gnu.org; Mon, 30 Jan 2012 16:27:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rryl3-00082H-Ap for emacs-devel@gnu.org; Mon, 30 Jan 2012 16:27:26 -0500 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]:36661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rryl3-000827-5z for emacs-devel@gnu.org; Mon, 30 Jan 2012 16:27:25 -0500 Original-Received: by dake40 with SMTP id e40so4256882dak.0 for ; Mon, 30 Jan 2012 13:27:23 -0800 (PST) Received-SPF: pass (google.com: domain of lekktu@gmail.com designates 10.68.225.4 as permitted sender) client-ip=10.68.225.4; Authentication-Results: mr.google.com; spf=pass (google.com: domain of lekktu@gmail.com designates 10.68.225.4 as permitted sender) smtp.mail=lekktu@gmail.com; dkim=pass header.i=lekktu@gmail.com Original-Received: from mr.google.com ([10.68.225.4]) by 10.68.225.4 with SMTP id rg4mr47464742pbc.111.1327958843798 (num_hops = 1); Mon, 30 Jan 2012 13:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=5u1Mes+L5KKJAgpJPfsm06O7Ad0QL8jX3HPwm4wRcqc=; b=h/nPZb86XrFPQrJGS24Oq5JMGdl1bjGNbEXGmMWrr9RcQjS0uTjJ4yst4n5otVf0bX vEU/0oh7mJmawRmkvVAA08vvjNYqjTuYxcm0ZDVztbbSDzjRN43S1PB/b+ZNKzQbsL7v 47rpvD8yHd2pw2axZcaYTftcLoE3pm6eP3fjY= Original-Received: by 10.68.225.4 with SMTP id rg4mr38863279pbc.111.1327958843699; Mon, 30 Jan 2012 13:27:23 -0800 (PST) Original-Received: by 10.143.37.9 with HTTP; Mon, 30 Jan 2012 13:26:43 -0800 (PST) In-Reply-To: <4F26DD9D.1080101@gmx.at> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.41 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:148049 Archived-At: On Mon, Jan 30, 2012 at 19:12, martin rudalics wrote: > Another possibility would be to give the window a `no-switch-to-buffer' > dedicated value and have `switch-to-buffer' / `display-buffer' observe > that. Well, yes, but isn't that like doing dedication all over again? > Maybe a `display-buffer-in-window-with-predicate' > would cover this. Yes, I proposed such function one or two messages ago ;-) > Where do you call `quit-window' here? =C2=A0Or did you want to call it he= re? I wanted to call it there, and also in case I do use quit-window interactiv= ely. > It would be easy to do that. =C2=A0We would only have to decide on a name= . Suit yourself :-) > And I thought that `jb-setup' would be the more general function. No, in the cases I was describing, choosing the window is generic, and setting it up is specific of each use case. > IIUC we have three reasonable ways to do it: > > (1) Put all the things we want (like desired window size, dedicatedness, > =C2=A0 =C2=A0...) into `display-buffer-alist'. =C2=A0That's what my origi= nal idea was > =C2=A0 =C2=A0and it's downside is that it makes `display-buffer-alist' bl= oated - > =C2=A0 =C2=A0we would have to put all this into its documentation. I like that, but I think Stefan would dislike the added complexity. > (2) Provide some sort of a hook within `display-buffer-alist'. =C2=A0That= 's > =C2=A0 =C2=A0easy to document and allows to call a function only for buff= ers that > =C2=A0 =C2=A0want it. =C2=A0The downside of this is that a user has to re= plicate it > =C2=A0 =C2=A0for each and every alist entry since entries are not merged. Still, it seems quite flexible. > (3) Provide a standard `display-buffer-functions' hook. =C2=A0This means = that > =C2=A0 =C2=A0the function called there has to handle every possible detai= l based > =C2=A0 =C2=A0on the window and the buffer's name. Yes, that's the least optimal answer. =C2=A0 =C2=A0 Juanma