If you have not heard about
emacs
registers, you are missing a very powerful tool in your
arsenal. Think of registers as "clipboard" on steroids. I had been
using registers to store text -i.e. C-x r s a
to copy
region into register "a" and C-x r i a
to insert text
from register "a".
Today, while reading the gnu.emacs.help newsgroup, I came to know that
you could save your current (emacs)frames layout to the register and
then restore it back again.
`C-x r w R'
Save the state of the selected frame's
windows in register R (`window-configuration-to-register').
`C-x r j R'
restore a window or frame configuration
stored in register R.
Here is the email where I saw this.
Re: how to keep/restore my view and mode?
On 20 Sep 2006 22:23:54 -0700 Leo Hou wrote:
> Dear all,
>
> I am not sure if I am using the right term of "view" and "mode". My
> problem is as follows:
>
> I am using C-x 3 and "follow-mode" to view my source code. Every time I
> compile, the other column becomes the result of make. I need to use a
> lot of keys to switch it back to normal: C-x o; C-x k; C-x o; M-x
> follow-mode
> Is there a better way?
C-x r w <some letter or number> to store a window layout and
C-x r j <the same number or letter> to restore it. And there
is no need to kill the compilation buffer. It gets reused
anyway.
David