Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

side windows become regular windows after swtiching workspace #52

Closed
bmag opened this issue Jun 27, 2016 · 6 comments
Closed

side windows become regular windows after swtiching workspace #52

bmag opened this issue Jun 27, 2016 · 6 comments

Comments

@bmag
Copy link

bmag commented Jun 27, 2016

Reproduction guide:

    1. create two workspaces
    1. in workspace 1, evaluate this code: (e.g. by using M-:)
(setq mywin (display-buffer (get-buffer-create "buff1") '(display-buffer-in-side-window (side . left) (slot . 0))))

buff1 is displayed on the left in a side window.

    1. evaluate this code: (window-parameter mywin 'window-side)
      returned value: left
    1. switch to workspace 2, then switch back to workspace 1
    1. evaluate this code: (window-parameter mywin 'window-side)
      returned value: nil, meaning buff1's window is a normal window now, not a side window.
      My expectation is that buff1's window should remain a side window.

To be fair, the same result happens if I replace step 4 with this step:

  • M-: (window-state-put (window-state-get mywin t) mywin)

Changing the value of window-persistent-parameters before step 4 solves my issue:

(add-to-list 'window-persistent-parameters '(window-side . writable))
(add-to-list 'window-persistent-parameters '(window-slot . writable))

I'm not sure why window-side and window-slot are not persistent by default, there could be a reason I'm not aware of.

I'm mentioning all this because I thought it could be helpful if eyebrowse modified window-persistent-parameters accordingly or suggested it as user configuration in the readme.

@wasamasa
Copy link
Owner

Sounds like an Emacs bug to me. If special care is taken to ensure that the clone-of parameter is restored, why then isn't the same done for other parameters that should be preserved as well?

Please report this upstream and submit the debbugs ticket here. After finding out what the official stance of the Emacs developers is on this, I'll add a point on it to the README.

@bmag
Copy link
Author

bmag commented Jun 27, 2016

Opened bug report 23858: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23858, lets see how it goes.

@wasamasa
Copy link
Owner

Thank you!

@wasamasa
Copy link
Owner

wasamasa commented Jul 5, 2016

I've checked again and it appears as if they aren't thrilled of the idea of changing defaults, but Martin Rudalics isn't opposed to enhancing window-state-get/window-state-put to support all window parameters.

I see a few options for proceeding:

  • Wait until this change has been implemented, end up doing nothing (yey)
  • Tell users to customize window-persistent-parameters in the README (clean solution for the few that care)
  • Let-bind window-persistent-parameters to an alist containing all the interesting parameters around everything using window-state-get/window-state-put (would magically work, but ignore a customized variable which sucks)
  • Customizing window-persistent-parameters for the users (plzno)

As you could probably guess, option 2 sounds best to me.

@bmag
Copy link
Author

bmag commented Jul 6, 2016

As you could probably guess, option 2 sounds best to me.

Agreed, that's probably the best.

@wasamasa
Copy link
Owner

wasamasa commented Jul 6, 2016

Great, I've added a notes section. For now it only contains this caveat, your provided customization sample and a link to this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants