Skip to content

Loading…

Save/Load a subset of defined perspectives #10

Closed
delexi opened this Issue · 5 comments

2 participants

@delexi

This is what I want to achieve:

Multiple perspectives that can be loaded independently from each other. If I have a bunch of perspectives I want to selectivley load one (or any subset) of them without touching the other perspecitves. I want to be be able to add buffers to said loaded perspective(s) and have these perspective(s) saved back to file upon closing emacs or deactivating persp-mode.

Wether this requires one or multiple files is not important.

Is this already possible? I didn't find anything like this.

Regards

@Bad-ptr
Owner

Is this already possible?

No, it is not. I'll take a look at it on this weekend I think.

@delexi

Is this already possible?

No, it is not. I'll take a look at it on this weekend I think.

Thank you!

@Bad-ptr
Owner

Added persp-load-from-file-by-names and persp-save-to-file-by-names functions by b3ed547 . Сheck it out and let me know if it does what you want.

@delexi

This works like a charm!

One little thing that I noticed:
Do not ask me whether I want to preserve perspectives already present in the file to save to if this file has not been created yet. This is the case when I first save a perspective to a new file.

Thank you for this quick reaction!

Edit: I spoke to quickly. Or maybe I did not describe my problem well enough. I am missing the fuctionality, that persp-mode automatically saves a perspective to the file it was loaded from, when emacs quits or persp-mode is deactivated. A little example:

  • I have perspectives A and B residing in the same file F.
  • I load-by-name A.
  • I add a buffer to A or do other stuff that changes the perspective.
  • I deactivate persp-mode or quit emacs and A is saved back to its file F without overwriting perspective B.

If this should be made into a seperate issue, please let me know.

Regards

@delexi delexi closed this
@delexi delexi reopened this
@Bad-ptr
Owner

automatically saves a perspective to the file it was loaded from, when emacs quits or persp-mode is deactivated

OK. I think it's feasible.

@Bad-ptr Bad-ptr closed this in bb34d1e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.