Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve perspectives when deleting a frame #42

Closed
wants to merge 1 commit into from
Closed

Preserve perspectives when deleting a frame #42

wants to merge 1 commit into from

Conversation

che2
Copy link
Contributor

@che2 che2 commented Dec 21, 2014

Currently, when a frame is deleted, the perspectives associated with
that frame is lost. This commit preserves the perspectives by
transferring them to another visible frame when available. Or saving the
perspectives from the last visible frame when emacs is running in daemon
mode so that they may be later restored.

Known Issues:

  • When restoring the last visible frame in daemon mode, the previous
    activated perspective is not reactivated. This is a deliberate
    choice, because saved window configurations does not transfer across
    frames ('persp-import' has the same problem), so reactivating the
    previously activated frame may inadvertently show a buffer from
    another perspective, which is undesirable.
    Perspectives lost after last frame is closed when running in daemon mode #41

Currently, when a frame is deleted, the perspectives associated with
that frame is lost.  This commit preserves the perspectives by
transferring them to another visible frame when available. Or saving the
perspectives from the last visible frame when emacs is running in daemon
mode so that they may be later restored.

Known Issues:
 - When restoring the last visible frame in daemon mode, the previous
   activated perspective is not reactivated.  This is a deliberate
   choice, because saved window configurations does not transfer across
   frames ('persp-import' has the same problem), so reactivating the
   previously activated frame may inadvertently show a buffer from
   another perspective, which is undesirable.
(cl-loop for name being the hash-keys of from-hash
when (not (gethash name to-hash)) do
(puthash name (gethash name from-hash)
to-hash)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than just ditching the old perspective if there already exists one with the same name, I think we should merge them as best we can.

@nex3
Copy link
Owner

nex3 commented May 8, 2015

Reviewed.

@nex3 nex3 closed this Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants