[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preserving window layout (follow up)

From: Matthew Calhoun
Subject: Re: Preserving window layout (follow up)
Date: Tue, 17 Jun 2003 09:29:52 -0700

Sure. Here it is:

(defun lock-window ()
  "Prevent Emacs from messing with the current window."
  (set-window-dedicated-p (frame-selected-window) t)
  (message "Locked window."))

(defun ide ()
  "Set up a simple IDE-like environment."
  (split-window-vertically -8)
  (other-window 1)
  (other-window 1)
; Make sure we can get back here if our setup somehow gets messed up (use 'C-x r j i')
  (window-configuration-to-register ?i)
(message "IDE initialized. Use 'C-x r j i' to return to this window configuration."))

El Monday, 16 June, 2003, a las 04:06 PM, address@hidden escribió:

Hey Matthew,

  please send me this function ... ;-)

-- Robert

"Matthew Calhoun" <address@hidden> wrote in message news:address@hidden

Thanks for all the suggestions. I found a really helpful function that
I'm surprised nobody mentioned, though: set-window-dedicated-p prevents
Emacs from messing with a particular window. I wound up writing a small
function that sets up my windows as described, calls this function for
the shell window, and then calls the window-configuration-to-register
function that Johan mentioned. Seems to work pretty well.

Thanks again,

El Saturday, 7 June, 2003, a las 02:16  PM, Johan Bockgård escribió:

Matthew Calhoun <address@hidden> writes:

Sort of a poor man's IDE. The problem is, when I do something like
command-apropos it wreaks havoc on my nice little environment - the
shell buffer grows to take up half of the frame, and the *Apropos*
buffer has taken the place of *shell*.

Another approach

,----[ C-h k C-x r w ]
| C-x r w runs the command window-configuration-to-register
|    which is an interactive compiled Lisp function in `register'.
| (window-configuration-to-register REGISTER &optional ARG)
| Store the window configuration of the selected frame in register
| Use C-x r j to restore the configuration.
| Argument is a character, naming the register.

(info "(emacs)RegConfig")

You might want to bind those to some nice keys.

Also see

(info "(emacs)Windows")
(info "(emacs)Window Convenience")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]