From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: dedicated frames Date: Tue, 09 Jan 2007 07:40:21 -0700 Message-ID: References: <1167833715.051263.12570@a3g2000cwd.googlegroups.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: sea.gmane.org 1168353708 19651 80.91.229.12 (9 Jan 2007 14:41:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2007 14:41:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 09 15:41:42 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H4IAM-0005Ll-8t for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jan 2007 15:41:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4IAL-0000ss-UA for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jan 2007 09:41:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4I9y-0000i8-IS for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 09:41:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4I9x-0000gy-Qx for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 09:41:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4I9x-0000gm-GG for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 09:41:05 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H4I9w-0000BV-TQ for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 09:41:05 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H4I9P-0000aW-Hy for help-gnu-emacs@gnu.org; Tue, 09 Jan 2007 15:40:31 +0100 Original-Received: from c-24-9-156-178.hsd1.co.comcast.net ([24.9.156.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Jan 2007 15:40:31 +0100 Original-Received: from kevin.d.rodgers by c-24-9-156-178.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Jan 2007 15:40:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 31 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-24-9-156-178.hsd1.co.comcast.net User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) In-Reply-To: <1167833715.051263.12570@a3g2000cwd.googlegroups.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40192 Archived-At: rgb wrote: > Has someone written a version of next-buffer that doesn't > display buffers that are already displayed in dedicated frames? > > It appears to me to be terribly difficult to tell if a given buffer > happens to be associated with a dedicated window or frame. How about: (defun get-buffer-dedicated-window (buffer &optional all-frames) "Return a dedicated window displaying BUFFER, or nil if none. BUFFER can be a buffer or a buffer name. ALL-FRAMES determines which frames are considered; see `walk-windows'." (catch 'window (mapc (lambda (window) (when (or (window-dedicated-p window) (frame-parameter (window-frame window) 'unsplittable)) (throw 'window window))) (get-buffer-window-list buffer nil all-frames)) nil)) I'm not sure how to plug that in to next-buffer -- maybe like this: (add-to-list 'default-frame-alist '(buffer-predicate . (lambda (buffer) (null (get-buffer-dedicated-window buffer))))) -- Kevin Rodgers Denver, Colorado, USA