all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* saving window configurations in register
@ 2022-12-25 14:53 Gottfried
  2022-12-25 16:50 ` Jean Louis
  2022-12-26 16:33 ` roadie
  0 siblings, 2 replies; 3+ messages in thread
From: Gottfried @ 2022-12-25 14:53 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


[-- Attachment #1.1.1: Type: text/plain, Size: 540 bytes --]

Hi,

I want that Emacs starts with the frame/window configuration I saved 
before.
e.g. the whole screen is divided into two buffers side by side with 2 
different files open.

How to do that?

C-x r w r a (a as register a) I tried, but it does not save it.
C-x r w r 1 (Register 1 I tried) but it doesn’t save it

Because when I open emacs again, nothing is saved in my registers

I tried
C-x r j r a (a as the saved register) but it says, there is nothing saved

Where is my mistake?
-- 
Kind regards

Gottfried


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: saving window configurations in register
  2022-12-25 14:53 saving window configurations in register Gottfried
@ 2022-12-25 16:50 ` Jean Louis
  2022-12-26 16:33 ` roadie
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Louis @ 2022-12-25 16:50 UTC (permalink / raw)
  To: Gottfried; +Cc: help-gnu-emacs@gnu.org

* Gottfried <gottfried@posteo.de> [2022-12-25 17:56]:
> I want that Emacs starts with the frame/window configuration I saved
> before.  e.g. the whole screen is divided into two buffers side by
> side with 2 different files open.

Good idea.

I recommend that you read in Emacs Manual following section:

(info "(emacs) Saving Emacs Sessions")

You may simply evaluate the above line in Emacs to get quicker to it.

> How to do that?

There are several ways, and by using the built-in option, you simply
do:

M-x desktop-save 

to save buffers, and window configuration, and:

M-x desktop-read

to read the configuration back into Emacs.

Please read in the Info Manual how to enable the option upon startup.

> C-x r w r a (a as register a) I tried, but it does not save it.

I think it is only:

C-x r w REGISTER -- to insert window configuration into register.

there is no "r" after "r w" that I know.

And to restore it, it is:

C-x r j 

> Because when I open emacs again, nothing is saved in my registers

Registers are not automatically saved when you exit Emacs. That means the state of window configuration will be deleted from memory when Emacs exits.

Package that could help with persistent state over sessions may be also following:

session - MELPA:
https://melpa.org/#/session

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: saving window configurations in register
  2022-12-25 14:53 saving window configurations in register Gottfried
  2022-12-25 16:50 ` Jean Louis
@ 2022-12-26 16:33 ` roadie
  1 sibling, 0 replies; 3+ messages in thread
From: roadie @ 2022-12-26 16:33 UTC (permalink / raw)
  To: Gottfried; +Cc: help-gnu-emacs@gnu.org

>>>>> "Gottfried" == Gottfried  <gottfried@posteo.de> writes:

    > Hi, I want that Emacs starts with the frame/window configuration I
    > saved before.  e.g. the whole screen is divided into two buffers
    > side by side with 2 different files open.

    > How to do that?

    If this setup is static (same 2 different files side by side) then I
    would make a kbd-macro to set this up and run that at the end of
    init.

    If this setup means you want the 2 different files you had side by
    side at the end of last session (and they are different to the 2 different files
    from the start of that last session) - I don't know.

    LG
    roadie




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-26 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-25 14:53 saving window configurations in register Gottfried
2022-12-25 16:50 ` Jean Louis
2022-12-26 16:33 ` roadie

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.