abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.27k stars 337 forks source link

ivy-push-views does not restore windows upon ivy-switch-buffer #2595

Open cedrickos opened 4 years ago

cedrickos commented 4 years ago

When using ivy-push-views, I can choose a filename and save. It appears in the list with C-x b. When I select it, the windows do not return.

If I set:

  (setq ivy-views
      '(("tester {}"
     (vert
      (file ".emacs")
      (file "~/.emacs.d/configuration.el")))))

This functionality works perfectly. I can select it and the windows are restored as I would expect. There seems to be an issue with the on the fly feature.

I am using GNU Emacs 25.2.2, would this be the issue or am I missing something?

Thank you!

abo-abo commented 4 years ago

Works fine for me, here's ivy-views after I saved two views on the fly:

ivy-views
;; =>
;; (("{} ivy.el swiper/git"
;;   #<window-configuration>)
;;  ("{} swiper/git"
;;   #<window-configuration>))

Can you reproduce this issue with make plain? If possible, with Emacs 26.3.

cedrickos commented 4 years ago

Yes it appears without an issue and works within the frame I issued ivy-push-view. I just realized that the issue is if I try to open it in an other frame. Is it supposed to be accessible from another frame if it is created on the fly?

Side note, ivy is fantastic!

abo-abo commented 4 years ago

We use set-window-configuration, which restores the window configuration of the frame where it was saved.

I don't think it's possible use this function to restore a frame configuration on a different frame.

If someone can manage to figure this out, PRs are welcome.