all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: TheFlyingDutchman <zzbbaadd@aol.com>
To: help-gnu-emacs@gnu.org
Subject: Re: split buffers
Date: Wed, 21 Jul 2010 21:29:59 -0700 (PDT)	[thread overview]
Message-ID: <47be08be-25b1-4396-b0a2-0dff98de85b9@p22g2000pre.googlegroups.com> (raw)
In-Reply-To: i28a6t$e06$1@news.eternal-september.org

There are two commands which seem to  save and restore buffer/window-
configurations in a frame that might suffice for what you want:

window-configuration-to-register
     (bound to Control-x r w)  to save it

and

jump-to-register
       (bound to Control-x r j)

So if you get a particular buffer/window-configuration set up you can
save it with c-x r w
    (you have to then type a number for a specific
       register e.g. 1, when prompted)

Then you can set up another buffer/window-configuration and save that
with c-x r w
      (giving a different register number when prompted)

Then you restore them at any time with c-x r j
   (and register number desired at the prompt)

You can simplify the keystroke combinations and typing by adding
something like this to your .emacs file:

(defun SaveWinConfigToRegister1 ()
"save window configuration to register 1"
  (interactive)
  (window-configuration-to-register 1)
)

(defun RestoreRegister1 ()
"restore configuration from register 1"
  (interactive)
  (jump-to-register 1)
)

(defun SaveWinConfigToRegister2 ()
"save window configuration to register 2"
  (interactive)
  (window-configuration-to-register 2)
)

(defun RestoreRegister2 ()
"restore configuration from register 2"
  (interactive)
  (jump-to-register 2)
)

(defun SaveWinConfigToRegister3 ()
"save window configuration to register 3"
  (interactive)
  (window-configuration-to-register 3)
)

(defun RestoreRegister3 ()
"restore configuration from register 3"
  (interactive)
  (jump-to-register 3)
)

; <CTRL-F1> to save window configuation to register 1
(global-set-key (kbd "<C-f1>") 'SaveWinConfigToRegister1)
; <ALT-F1> to restore window configuration saved in register 1
(global-set-key (kbd "<M-f1>") 'RestoreRegister1)
; <CTRL-F1> to save window configuation to register 2
(global-set-key (kbd "<C-f2>") 'SaveWinConfigToRegister2)
; <ALT-F1> to restore window configuration saved in register 2
(global-set-key (kbd "<M-f2>") 'RestoreRegister2)
(global-set-key (kbd "<C-f3>") 'SaveWinConfigToRegister3)
(global-set-key (kbd "<M-f3>") 'RestoreRegister3)


  parent reply	other threads:[~2010-07-22  4:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <i27ovc$ah0$1@news.eternal-september.org>
2010-07-22  1:21 ` split buffers TheFlyingDutchman
2010-07-22  1:53   ` TheFlyingDutchman
     [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
2010-07-22  4:25     ` AmosBurke
2010-07-22  4:29     ` TheFlyingDutchman [this message]
2010-07-22  5:21       ` Peter Keller
2010-07-22  6:28     ` Andreas Politz
2010-07-22 15:18 ` jpkotta

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

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

  git send-email \
    --in-reply-to=47be08be-25b1-4396-b0a2-0dff98de85b9@p22g2000pre.googlegroups.com \
    --to=zzbbaadd@aol.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.