-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Provide ace-window-posframe-mode #192
Conversation
Use posframes for overlays.
Thanks. Looks good. Do you have an Emacs Copyright Assignment? Both |
Working on it. Will let you know once it's done. |
Thanks in advance. |
I'm using this with This is a useful patch for a great package! Thanks to you both. |
:poshandler aw-posframe-position-handler | ||
:font (face-font 'aw-leading-char-face) | ||
:foreground-color (face-foreground 'aw-leading-char-face) | ||
:background-color (face-background 'aw-leading-char-face))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm excited to have this functionality in ace-window
mainly for use with exwm
. For that, though, I need to add the (parent-frame . nil)
parameter to posframes. So a defcustom aw-posframe-parameters
would be lovely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does (parent-frame . nil) work well?
ace-window-posframe.el
Outdated
:background-color (face-background 'aw-leading-char-face))))) | ||
|
||
(defun aw--remove-leading-chars-posframe () | ||
(map nil #'posframe-delete aw--posframe-frames)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my ignorance, but while trying this I got an error about map not being defined. I don't know which package should provide this (I tried to install and load a package called "map", but it didn't work). A simpler
(mapcar #'posframe-delete aw--posframe-frames)
seems to work. (I only did some quick testing).
Another thing is that using your fork, posframe is not listed as dependency (or at least straight.el doesn't think it is -- I am not yet aware of how dependencies are declared and consumed.)
Anyway, thanks for this feature, is awesome :)
@abo-abo Finally I have the copyright assignment. I'm going to take a look at this again, and address the comments above. |
@notmgsk: The posframe display delay probably occurs because posframe creation takes a bit of time. You can mitigate the problem by caching and hiding posframes (and lazily creating them as needed, and/or pre-creating a bunch when Emacs idles). |
Thanks. The lazy approach is already implemented, and has been sufficient for my usage. |
;; something like: a frame exists which hasn't been deleted | ||
;; (with posframe-delete) and has the same configuration as | ||
;; the requested new frame. | ||
(bufname (format "*aw-posframe-buffer-%s*" path))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better?
(bufname (format " *aw-posframe-buffer-%s*" path)))
Hello! Thank you for ace-window! Is there a reason to not merge this PR? |
Merged. Thanks @notmgsk for the contribution. And to everyone who reviewed. And @josephmturner for the ping. |
Use posframes for overlays.
There does seem to be a slight but noticable delay when displaying the posframes. Haven't investigated too much into why.