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

guide-key window is sized incorrectly when other windows don't span the frame #915

Closed
kini opened this issue Mar 22, 2015 · 10 comments
Closed

Comments

@kini
Copy link
Contributor

kini commented Mar 22, 2015

Steps to reproduce:

  1. Open spacemacs
  2. Do SPC w / SPC w / SPC w / SPC
  3. Note that the guide-key window that pops up is not wide enough to show all the text.
@syl20bnr
Copy link
Owner

This is a recurring issue with popup buffers. I don't know how we can handle this on the Spacemacs side, maybe we can provide a minimal size.

@bmag
Copy link
Collaborator

bmag commented Mar 29, 2015

Hi, I managed to fix the problem with a locally modified version of guide-key. My local version uses window-purpse instead of popwin.
I can add my version of guide-key to spacemacs, or I can write some defadvices instead. Basically, I've overridden guide-key/close-guide-buffer and guide-key/popup-guide-buffer, and added a hook to guide-key-mode-hook.
However, these changes require that spacemacs use a new package (window-purpose), so I'm not sure if I should upload them or keep them to myself.
@syl20bnr , what do you think?

@syl20bnr
Copy link
Owner

@bmag I don't see the relation between window-purpose and popwin so I'm curious to know how window-purpose fixes this. Does window-purpose provide a popwin feature ?

@bmag
Copy link
Collaborator

bmag commented Mar 31, 2015

window-purpose is more general than popwin. It is actually meant to be an alternative window manager for emacs, but guide-key can use it for popping and closing the guide-key window.
I'll open a PR with the proper advices for guide-key, so you can see something concrete, but only next week (I won't have time this week).

@syl20bnr
Copy link
Owner

Cool ! Thank you.

@tuhdo
Copy link
Contributor

tuhdo commented Mar 31, 2015

As far as I know, window-purpose tries to keep a persistent layout, while popwin tries to manage temporary buffers and sizes of such buffers. How can window-purpose replace popwin?

@bmag
Copy link
Collaborator

bmag commented Mar 31, 2015

You'll see in the PR :-)
Important parts are a custom display function and (mapc 'delete-window (purpose-windows-with-purpose 'guide-key)).

@bmag
Copy link
Collaborator

bmag commented Apr 4, 2015

Done it. Looks fine?

@x-ji
Copy link
Contributor

x-ji commented Apr 26, 2015

Changes introduced in #1072 works fine for me. Now guide-key window can be displayed with appropriate width.

However, if @syl20bnr deem window-purpose to be too complicated to be incorporated for now, I think at least to solve the particular problem of guide-key window, we can just set guide-key/popup-window-position 'bottom. In this way there will definitely be enough space to display all the text without them being cropped.

@x-ji
Copy link
Contributor

x-ji commented Apr 26, 2015

Did a PR to change the window position #1387 as a temporary fix.

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

5 participants