unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Gary .'" <help-gnu-emacs@garydjones.name>,
	"'emacs list'" <help-gnu-emacs@gnu.org>
Subject: RE: Window configuration
Date: Thu, 27 May 2010 11:05:07 -0700	[thread overview]
Message-ID: <7DABEC93B13C46BDA7A4109AA8F8E59C@us.oracle.com> (raw)
In-Reply-To: <5B19934DF9BF427191F00B79362EEC12@us.oracle.com>

> > > 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




  reply	other threads:[~2010-05-27 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 15:08 Window configuration Gary .
2010-05-27 15:33 ` Drew Adams
2010-05-27 15:49   ` Drew Adams
2010-05-27 18:05     ` Drew Adams [this message]
2010-05-27 19:28   ` Gary
     [not found]   ` <mailman.4.1274988537.9628.help-gnu-emacs@gnu.org>
2010-05-28  0:52     ` Stefan Monnier
     [not found] <mailman.5.1274972891.6808.help-gnu-emacs@gnu.org>
2010-06-02 20:02 ` Andreas Politz
2010-06-04 18:10   ` Joseph Brenner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7DABEC93B13C46BDA7A4109AA8F8E59C@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@garydjones.name \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).