From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Window configuration Date: Thu, 27 May 2010 11:05:07 -0700 Message-ID: <7DABEC93B13C46BDA7A4109AA8F8E59C@us.oracle.com> References: <5B19934DF9BF427191F00B79362EEC12@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274983610 3272 80.91.229.12 (27 May 2010 18:06:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 May 2010 18:06:50 +0000 (UTC) To: "'Gary .'" , "'emacs list'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 27 20:06:49 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OHhTk-0001hi-Pc for geh-help-gnu-emacs@m.gmane.org; Thu, 27 May 2010 20:06:49 +0200 Original-Received: from localhost ([127.0.0.1]:58445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHhTj-0005nI-Uf for geh-help-gnu-emacs@m.gmane.org; Thu, 27 May 2010 14:06:48 -0400 Original-Received: from [140.186.70.92] (port=57004 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHhSn-0005is-5t for help-gnu-emacs@gnu.org; Thu, 27 May 2010 14:05:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHhSm-0003Ld-0c for help-gnu-emacs@gnu.org; Thu, 27 May 2010 14:05:48 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:43093) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHhSl-0003LR-Q0 for help-gnu-emacs@gnu.org; Thu, 27 May 2010 14:05:47 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4RI5V4T000303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 May 2010 18:05:33 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4RI5Qjp006210; Thu, 27 May 2010 18:05:27 GMT Original-Received: from abhmt016.oracle.com by acsmt354.oracle.com with ESMTP id 303432151274983499; Thu, 27 May 2010 11:04:59 -0700 Original-Received: from dradamslap1 (/10.175.228.31) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 27 May 2010 11:04:58 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <5B19934DF9BF427191F00B79362EEC12@us.oracle.com> Thread-Index: Acr9rm973YN30r4wSSmN3fvWqaOe3QAAvTgwAACW6oAABLeOMA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Auth-Type: Internal IP X-Source-IP: rcsinet15.oracle.com [148.87.113.117] X-CT-RefId: str=0001.0A090203.4BFEB471.01B5:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:73782 Archived-At: > > > I swear, if emacs "steals" a window to reuse for something > > > else again, I'm going to swing an axe at it. > > > > > > Is there any way to specify that windows containing buffers > > > which have a certain mode should *never* be reused or closed > > > unless specifically by user action (for example visiting a > > > new file from the window)? > > > > Yes, make them dedicated windows. > > See the Elisp manual, node `Dedicated Windows'. > > See the Elisp manual, node `Choosing Window'. > > > > The easiest way to do this is to use > > `special-display-regexps', giving it a > > regexp that matches all buffer names. By default, a > > "special-display" buffer is shown in a dedicated window. > > I forgot to answer your question about making this mode-specific. > You can do that using `set-window-dedicated-p' on a mode hook. > Or if all buffers in the mode in question have a certain name > pattern, then you can use `special-buffer-regexps'. Or customize the mode-hook variable (e.g. `emacs-lisp-mode-hook') to add a function like this: (lambda () (make-local-variable 'special-display-regexps) (add-to-list 'special-display-regexps ".*")) FWIW, I filed an Emacs bug to improve the doc about this for users: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6280