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

Wrong display of popup buffer when that buffer is already selected #1768

Closed
bmag opened this issue May 29, 2015 · 19 comments
Closed

Wrong display of popup buffer when that buffer is already selected #1768

bmag opened this issue May 29, 2015 · 19 comments

Comments

@bmag
Copy link
Collaborator

bmag commented May 29, 2015

When I have a popup buffer open in a popup window, and that window is selected, and I perform on operation that should display that buffer again, the buffer is displayed in the wrong place.

I expect the buffer to remain in the popup window. Instead, the popup window is closed, and the buffer is displayed as if it is a regular buffer.

For example:
spacemacs-wrong-popup

Also, if I open a grep buffer (with find-grep), then a help buffer, the popup windows stack one underneath the other. Closing them with C-g works. Is it intended or a bug?

spacemacs-stacked-popup-windows

Using develop branch on Lubuntu 14.04.

@tuhdo
Copy link
Contributor

tuhdo commented May 29, 2015

The first case seems like a popwin bug.

The stacking window is expected because otherwise your grep buffer would close immediately if point moves to other window, in which case it is not undesirable. And it's a feature that your temporary window is not immediately close without your permission. In the second case, you can just press C-g until all temporary windows close. And when you open a Helm command, the previous window is raised above Helm window because when Helm is entered, popwin-mode is temporary disabled until that Helm session finishes. Without disabling popwin in Helm, it would mess up Helm commands that open extra windows when executing persistent action, lie helm-M-x or helm-descbinds or helm-apropos.

@bmag
Copy link
Collaborator Author

bmag commented May 29, 2015

So, no way around the first case?

Thanks for explaining the stacking 😃

@sooheon
Copy link

sooheon commented Jun 15, 2015

I think I may have a related issue:

Starting with one frame,

  1. spc g s to open magit status in split
  2. L l to show magit log, replacing magit status
  3. enter on any entry to show commit information in other split
  4. qqq to quit out of magit entirely, and you are left with a split window, when you should go back to original single window state.

@tuhdo
Copy link
Contributor

tuhdo commented Jun 15, 2015

@sooheon That's the default behaviour of Emacs. Magit is not under the control of popwin, so that's why you are left with a split window.

@sooheon
Copy link

sooheon commented Jun 15, 2015

Strange then, because if I only go 1 level deep into magit (just magit-status, for example), q will take me back to the original window configuration. Do you mean this discrepancy is the intended behaviour?

@tuhdo
Copy link
Contributor

tuhdo commented Jun 15, 2015

Yes, with only magit installed in stock Emacs, it behaves that way. Probably we need to put the magit buffers under the control of popwin.

@sooheon
Copy link

sooheon commented Jun 15, 2015

I see. I wonder if things may be improved in the new magit.. that would save us having to wrangle it into popwin.

@StreakyCobra
Copy link
Contributor

@bmag Can you check if there is any update on this issue 😃 ?

@bmag
Copy link
Collaborator Author

bmag commented Dec 6, 2015

The bug still exists. I don't encounter it anymore because I use the window-purpose layer.

@StreakyCobra
Copy link
Contributor

Ok thanks 👍 Do you think it should be reported upstream to popwin?

@bmag
Copy link
Collaborator Author

bmag commented Dec 6, 2015

This is definitely a popwin bug - the same thing happens to me also when using popwin with an empty emacs config. The only difference is that with powin and bare emacs, I end up with a vertical split instead of a horizontal split. I couldn't figure out what causes this difference.
I will report it upstream, but I don't know if I'll get any answer. There are quite a few issues there with no response.

@sooheon
Copy link

sooheon commented Dec 6, 2015

@bmag to be clear, you are using window-purpose the package but it's not officially a spacemacs layer yet, right? If it's fixed this problem for you, would you mind contributing your config as a PR?

@syl20bnr
Copy link
Owner

syl20bnr commented Dec 6, 2015

There is already a PR for it (very old), originally planned for 0.105 I moved it to 0.106.

@StreakyCobra
Copy link
Contributor

@bmag If you can do it it's really nice of you. I just wanted to be sure if it was a Spacemacs issue or not.

@bmag
Copy link
Collaborator Author

bmag commented Dec 6, 2015

@StreakyCobra Reported upstream: emacsorphanage/popwin#131 just now

@StreakyCobra
Copy link
Contributor

@bmag Awesome ☺️ Thanks

@Compro-Prasad
Copy link
Contributor

Compro-Prasad commented Sep 26, 2018

Is this is fixed. Or am I misunderstanding it?

@Compro-Prasad
Copy link
Contributor

Compro-Prasad commented Sep 27, 2018

Upstream repository is not been actively maintained for a long time. We need to have it as an internal Spacemacs elisp file with the fixed changes as mentioned in emacsorphanage/popwin#131 .

@bmag
Copy link
Collaborator Author

bmag commented Sep 27, 2018

@Compro-Prasad this is fixed in Spacemacs, but still not fixed upstream. We fixed it by using window-purpose and a local package that implements popup buffers by extending window-purpose (see spacemacs-purpose layer). The configuration of popup buffers is still done through popwin:special-display-config, but other than that we mostly avoid popwin entirely. Hence, I'm closing the issue.

@bmag bmag closed this as completed Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants