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

Spaces: the quit-window function doesn't work properly for windows restored by spaces #8

Open
Havner opened this issue Feb 7, 2019 · 1 comment

Comments

@Havner
Copy link

Havner commented Feb 7, 2019

The 'q' key that is binded to quit-window function in many RO buffers behaves wrong with spaces.
The easiest way to reproduce it is to open some file, enter dired, push q -> it should go back to the opened file.
Now open the same file, enter dired, change space, return back to the previous one, hit 'q'. It won't go the file as previous. It will go back to some buffer that was visible in the other space.
EDIT: It doesn't seem to have anything to do with quit-restore parameter as I originally though. It seems to have something with (window-prev-buffers). Probably it would have to be saved by hand :-/

@Havner Havner changed the title Spaces: the quit-restore window parameter is not saved/restored Spaces: the quit-window function doesn't work properly for windows restored by spaces Feb 7, 2019
@chumpage
Copy link
Owner

Hmm, right, I see the problem. Some potential solutions:

  1. Make current-window-configuration/set-window-configuration save and restore the previous and next buffer lists. Spaces is mostly just a thin wrapper around set-window-configuration. It's weird that set-window-configuration doesn't already preserve that state.

  2. Switch to window-state-get and window-state-put for saving/restoring window state. I'm not sure if those functions preserve the prev/next buffer lists though. There was talk of making them preserve that state, but I'm not sure where things ended up: http://emacs.1067599.n8.nabble.com/bug-32850-27-0-50-window-swap-states-doesn-t-swap-window-prev-next-buffers-td466054.html

  3. Save and restore the prev/next buffer lists ourselves. This shouldn't be very hard to implement, though we may need to take extra care to handle buffers which get killed between the save/restore.

My emacs usage has changed over the years and I don't use the Spaces library much anymore, so I don't feel urgency to work on it. If you have a reasonable patch I'd be happy to take it.

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

No branches or pull requests

2 participants