wasamasa / eyebrowse

A simple-minded way of managing window configs in emacs
GNU General Public License v3.0
437 stars 24 forks source link

Question: how to go back and forth in the order the window configuration appeared #68

Closed QiangF closed 7 years ago

QiangF commented 7 years ago

Winner-undo and winner-redo are supposed to do that, but some window configurations are lost for reason I don't know. Eyebrowse-mode has more functionalities. So I am trying to get this to work with the following steps:

  1. create a slot ring with a maximum size, the ring can just be a string of slot number or names, it would be simpler than https://github.com/wasamasa/eyebrowse/issues/7

  2. create a window configuration after buffer switch and push it to the last slot in the slot ring, buffer swith is the only window configuration change by the user:

(advice-add 'switch-to-buffer :after #'eyebrowse-create-window-config)

  1. create a command to switch back and forth in the slots ring, if command other than switch back and forth is executed and the window configuration has been changed, goto 2.

In step 2, I have come with a problem, if the destination buffer is the minibuffer, no window configuration should be created.

Possible issues:

I am using the EXWM window manager (https://github.com/ch11ng/exwm), it can move window to another exwm workspace on the other monitor, the configuration will corrupt if a x window is removed from the current frame. May be related to https://github.com/wasamasa/eyebrowse/issues/45 https://github.com/wasamasa/eyebrowse/issues/40

Are there better ways to achieve what I want?

wasamasa commented 7 years ago

You should be able to achieve that by using the provided hooks and saving window configurations elsewhere when they're run. That being said, I don't have issues with winner-mode here for the undoing bits. If you have a repro for any of the bugs mentioned, open a ticket with it.