unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Saving a window configuration ?
@ 2019-03-06 22:39 jonetsu
  2019-03-07  3:27 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: jonetsu @ 2019-03-06 22:39 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

Is it possible to save in a persistent way a window configuration (like
one saved by doing C-x r w <key> and recalled with C-x r <key>) so that
it can be recalled, with the same files, at a later time ?

Cheers.



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

* Re: Saving a window configuration ?
  2019-03-06 22:39 Saving a window configuration ? jonetsu
@ 2019-03-07  3:27 ` Eli Zaretskii
  2019-03-07  3:44   ` YUE Daian
  2019-03-07 18:09   ` jonetsu
  0 siblings, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-03-07  3:27 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 6 Mar 2019 17:39:22 -0500
> From: jonetsu <jonetsu@teksavvy.com>
> 
> Is it possible to save in a persistent way a window configuration (like
> one saved by doing C-x r w <key> and recalled with C-x r <key>) so that
> it can be recalled, with the same files, at a later time ?

Yes, see frameset.el.



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

* Re: Saving a window configuration ?
  2019-03-07  3:27 ` Eli Zaretskii
@ 2019-03-07  3:44   ` YUE Daian
  2019-03-07 18:09   ` jonetsu
  1 sibling, 0 replies; 10+ messages in thread
From: YUE Daian @ 2019-03-07  3:44 UTC (permalink / raw)
  To: help-gnu-emacs

On 2019-03-07 05:27, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Wed, 6 Mar 2019 17:39:22 -0500
>> From: jonetsu <jonetsu@teksavvy.com>
>> 
>> Is it possible to save in a persistent way a window configuration (like
>> one saved by doing C-x r w <key> and recalled with C-x r <key>) so that
>> it can be recalled, with the same files, at a later time ?
>
> Yes, see frameset.el.

If you are looking for interactive commands...

Store window/frame configuration:
`window-configuration-to-register` bound to `C-x r w` by default.
`frameset-to-register` bound to `C-x r f` by default.

Restore window/frame configuration:
`jump-to-register` bound to `C-x r j` by default.



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

* Re: Saving a window configuration ?
  2019-03-07  3:27 ` Eli Zaretskii
  2019-03-07  3:44   ` YUE Daian
@ 2019-03-07 18:09   ` jonetsu
  2019-03-07 18:48     ` Robert Pluim
  2019-03-07 18:50     ` Drew Adams
  1 sibling, 2 replies; 10+ messages in thread
From: jonetsu @ 2019-03-07 18:09 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 07 Mar 2019 05:27:11 +0200
Eli Zaretskii <eliz@gnu.org> wrote:

> Yes, see frameset.el.

I'm afraid this is only half of it.  From the comments:

;; It should be noted that restoring the frames' windows depends on
;; the buffers they are displaying, but this package does not provide
;; any way to save and restore sets of buffers (see desktop.el for
;; that).  So, it's up to the user of frameset.el to make sure that
;; any relevant buffer is loaded before trying to restore a frameset.

If 15 files are opened and the frames are saved, then the files will
need to be re-opened one by one and only after doing that can the
saved positions and sized of the frames be restored to produce what's
expected: restoring emacs like it was when last left, with all the
files and all the frames.  As far as I consider my query, this is
pretty much half-cooked.  What's the use of wanting to be able to
restore emacs like it was with all the frame sizes and positions AND
the files, in a single operation, if all the files have to be manually
opened before ?  If all the files have to be manually opened then might
as well forget about the size and position of the frames and
re-organize them.  

What I would like is to get back to emacs with the 15 files being
displayed just like they were last time.  The corollary to this
mechanism would be that since it can do that, it can thus reload any
other saved "buffers & frames" (B&F for short).  So if I switch from one
project to another I can save the current B&F and then switch to the
other project's B&F in one operation, ready to continue from the exact
same place it was left before. And later on switch back to the previous
project's saved B&F 



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

* Re: Saving a window configuration ?
  2019-03-07 18:09   ` jonetsu
@ 2019-03-07 18:48     ` Robert Pluim
  2019-03-07 21:22       ` jonetsu
  2019-03-07 18:50     ` Drew Adams
  1 sibling, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2019-03-07 18:48 UTC (permalink / raw)
  To: jonetsu; +Cc: help-gnu-emacs

>>>>> On Thu, 7 Mar 2019 13:09:54 -0500, jonetsu <jonetsu@teksavvy.com> said:

    jonetsu> If 15 files are opened and the frames are saved, then the
    jonetsu> files will need to be re-opened one by one and only after
    jonetsu> doing that can the saved positions and sized of the
    jonetsu> frames be restored to produce what's expected: restoring
    jonetsu> emacs like it was when last left, with all the files and
    jonetsu> all the frames.  As far as I consider my query, this is
    jonetsu> pretty much half-cooked.  What's the use of wanting to be
    jonetsu> able to restore emacs like it was with all the frame
    jonetsu> sizes and positions AND the files, in a single operation,
    jonetsu> if all the files have to be manually opened before ?  If
    jonetsu> all the files have to be manually opened then might as
    jonetsu> well forget about the size and position of the frames and
    jonetsu> re-organize them.

    jonetsu> What I would like is to get back to emacs with the 15
    jonetsu> files being displayed just like they were last time.  The
    jonetsu> corollary to this mechanism would be that since it can do
    jonetsu> that, it can thus reload any other saved "buffers &
    jonetsu> frames" (B&F for short).  So if I switch from one project
    jonetsu> to another I can save the current B&F and then switch to
    jonetsu> the other project's B&F in one operation, ready to
    jonetsu> continue from the exact same place it was left
    jonetsu> before. And later on switch back to the previous
    jonetsu> project's saved B&F


This sounds like you want to use 'desktop-save'/'desktop-read' in
combination with 'desktop-restore-frames t' (along with specifying a
project directory every time you call those functions)

desktop.el might be overkill though, it saves a lot of state.

Robert



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

* RE: Saving a window configuration ?
  2019-03-07 18:09   ` jonetsu
  2019-03-07 18:48     ` Robert Pluim
@ 2019-03-07 18:50     ` Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2019-03-07 18:50 UTC (permalink / raw)
  To: jonetsu, help-gnu-emacs

> > Yes, see frameset.el.
> 
> I'm afraid this is only half of it.  From the comments:
> 
> ;; It should be noted that restoring the frames' windows depends on
> ;; the buffers they are displaying, but this package does not provide
> ;; any way to save and restore sets of buffers (see desktop.el for
> ;; that).  So, it's up to the user of frameset.el to make sure that
> ;; any relevant buffer is loaded before trying to restore a frameset.
> 
> If 15 files are opened and the frames are saved, then the files will
> need to be re-opened one by one and only after doing that can the
> saved positions and sized of the frames be restored to produce what's
> expected: restoring emacs like it was when last left, with all the
> files and all the frames.  As far as I consider my query, this is
> pretty much half-cooked.  What's the use of wanting to be able to
> restore emacs like it was with all the frame sizes and positions AND
> the files, in a single operation, if all the files have to be manually
> opened before ?  If all the files have to be manually opened then might
> as well forget about the size and position of the frames and
> re-organize them.
> 
> What I would like is to get back to emacs with the 15 files being
> displayed just like they were last time.  The corollary to this
> mechanism would be that since it can do that, it can thus reload any
> other saved "buffers & frames" (B&F for short).  So if I switch from one
> project to another I can save the current B&F and then switch to the
> other project's B&F in one operation, ready to continue from the exact
> same place it was left before. And later on switch back to the previous
> project's saved B&F

Have you tried `desktop.el'?



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

* Re: Saving a window configuration ?
  2019-03-07 18:48     ` Robert Pluim
@ 2019-03-07 21:22       ` jonetsu
  2019-03-07 21:46         ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: jonetsu @ 2019-03-07 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 07 Mar 2019 19:48:39 +0100
Robert Pluim <rpluim@gmail.com> wrote:

> This sounds like you want to use 'desktop-save'/'desktop-read' in
> combination with 'desktop-restore-frames t' (along with specifying a
> project directory every time you call those functions)
> 
> desktop.el might be overkill though, it saves a lot of state.

Although it does not seem to store frame sizes and positions, from the
Wikemacs description.  But it can be used with bookmarks in such a way
as to have several saved desktops to choose from. OTOH, Wikemacs points
to psession.el which do save frame info (eg. last window configuration)
along with buffers.  I will give psession a try.





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

* RE: Saving a window configuration ?
  2019-03-07 21:22       ` jonetsu
@ 2019-03-07 21:46         ` Drew Adams
  2019-03-08  7:18           ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2019-03-07 21:46 UTC (permalink / raw)
  To: jonetsu, help-gnu-emacs

> > This sounds like you want to use 'desktop-save'/'desktop-read' in
> > combination with 'desktop-restore-frames t' (along with specifying a
> > project directory every time you call those functions)
> >
> > desktop.el might be overkill though, it saves a lot of state.
> 
> Although it does not seem to store frame sizes and positions, from the
> Wikemacs description.

It does save and restore those, AFAIK.

> But it can be used with bookmarks in such a way
> as to have several saved desktops to choose from.

Yes, if you use Bookmark+.  Just jump to a (desktop)
bookmark to switch to that desktop.

https://www.emacswiki.org/emacs/Desktop

https://www.emacswiki.org/emacs/BookmarkPlus



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

* Re: Saving a window configuration ?
  2019-03-07 21:46         ` Drew Adams
@ 2019-03-08  7:18           ` Eli Zaretskii
  2019-03-08 10:17             ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-03-08  7:18 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 7 Mar 2019 13:46:35 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> 
> > > desktop.el might be overkill though, it saves a lot of state.
> > 
> > Although it does not seem to store frame sizes and positions, from the
> > Wikemacs description.
> 
> It does save and restore those, AFAIK.

Most definitely, yes.  If Wikemacs says otherwise, it is wrong and
should be corrected.



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

* Re: Saving a window configuration ?
  2019-03-08  7:18           ` Eli Zaretskii
@ 2019-03-08 10:17             ` Robert Pluim
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Pluim @ 2019-03-08 10:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

>>>>> On Fri, 08 Mar 2019 09:18:34 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> Date: Thu, 7 Mar 2019 13:46:35 -0800 (PST) From: Drew Adams
    >> <drew.adams@oracle.com>
    >> 
    >> > > desktop.el might be overkill though, it saves a lot of
    >> state.
    >> > 
    >> > Although it does not seem to store frame sizes and positions,
    >> from the > Wikemacs description.
    >> 
    >> It does save and restore those, AFAIK.

    Eli> Most definitely, yes.  If Wikemacs says otherwise, it is
    Eli> wrong and should be corrected.

Wikemacs doesnʼt say it restores frame sizes and positions, so itʼs an
error of omission rather than commission, which Iʼve corrected.

Robert



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

end of thread, other threads:[~2019-03-08 10:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-06 22:39 Saving a window configuration ? jonetsu
2019-03-07  3:27 ` Eli Zaretskii
2019-03-07  3:44   ` YUE Daian
2019-03-07 18:09   ` jonetsu
2019-03-07 18:48     ` Robert Pluim
2019-03-07 21:22       ` jonetsu
2019-03-07 21:46         ` Drew Adams
2019-03-08  7:18           ` Eli Zaretskii
2019-03-08 10:17             ` Robert Pluim
2019-03-07 18:50     ` Drew Adams

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