From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: display-buffer-alist simplifications Date: Mon, 08 Aug 2011 16:51:39 -0400 Message-ID: <87y5z3ocdg.fsf@stupidchicken.com> References: <87mxgem09k.fsf@stupidchicken.com> <4E22AE2B.5040806@gmx.at> <4E248102.6080904@gmx.at> <4E380918.3060806@gmx.at> <4E397611.5020603@gmx.at> <87oc037qwj.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312836717 18347 80.91.229.12 (8 Aug 2011 20:51:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 8 Aug 2011 20:51:57 +0000 (UTC) Cc: Juri Linkov , martin rudalics , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 08 22:51:50 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 1QqWne-0002HC-9V for ged-emacs-devel@m.gmane.org; Mon, 08 Aug 2011 22:51:50 +0200 Original-Received: from localhost ([::1]:60025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWnd-0006EZ-Hj for ged-emacs-devel@m.gmane.org; Mon, 08 Aug 2011 16:51:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWna-0006ES-4F for emacs-devel@gnu.org; Mon, 08 Aug 2011 16:51:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqWnY-0002WD-Od for emacs-devel@gnu.org; Mon, 08 Aug 2011 16:51:46 -0400 Original-Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]:45016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWnY-0002UO-MV for emacs-devel@gnu.org; Mon, 08 Aug 2011 16:51:44 -0400 Original-Received: from furball (dhcp-128-36-14-148.central.yale.edu [128.36.14.148]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p78Kpew9016807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 8 Aug 2011 16:51:40 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 05 Aug 2011 15:22:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.146 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:143031 Archived-At: Stefan Monnier writes: >> Should I write a new function and use it like: > >> (setq display-buffer-alist '( >> ("*Help*" display-buffer-other-window-same-frame-or-same-window))) > > Yes, I think that would be the answer. Except that this should be a list of rules, because you don't want to force users to define a new function each time they want to "chain" two rules together. So this becomes (setq display-buffer-alist '(("*Help*" rule-1 rule-2))) But if you want to be able to pass extra parameters to the rule functions (so that you don't have to define a new function for every combination of window-choosing behaviors), you can generalize this to something like (setq display-buffer-alist '(("*Help*" (rules rule-1 rule-2) (param-1 foo) (param-2 bar)))) which is basically the same scheme I suggested earlier.