-
Notifications
You must be signed in to change notification settings - Fork 58
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
Why disable after-make-frame-functions
?
#29
Comments
I use Also, posframe needs to set |
I was experimenting with ivy-posframe, and enabled it for Swiper like so:
Provided this code is in the Emacs startup script (and all dependencies load), then (1) make sure I can also reproduce this with just the code from the posframe README:
This was tricky to track down. I knew the problem only showed up after I installed posframe and ivy-posframe, and it obviously had to do with persp-mode, but I had no idea where the crash took place. Unfortunately, this is only one of many places where persp-mode assumes that |
I am interested in this issue because I am the maintainer of I tried the first reproduction process. Since
However, the error you reported did not occur. Please give me more details or try my below init.el. There is full init.el for debug.
NOTE: |
Thank you for looking into it. Looking at your The fork you use is https://github.com/Bad-ptr/persp-mode.el. The original which I use is https://github.com/nex3/perspective-el. The original is confusingly and unfortunately named: it is called both I prefer the original because I find its frame-specific perspective list behavior preferable to the unified perspectives of the fork. In addition, I prefer to avoid the workgroups.el dependency the fork uses to implement saving perspectives to disk. I wrote a from-scratch implementation of perspective save and restore for the original package, which is currently in PR (nex3/perspective-el#80). |
Actually, I was wrong about one thing: the fork does use frame parameters, though rather differently from the original. It also does use |
Thanks! I installed 'original' perspective.el, then occur error you reported. |
I sent a PR to Proper conditional branching should be done before use, which is a common programming practice. However, looking at the |
i do not remeber the reason to add this line, maybe i think it make posfame more stable. |
@tumashu: Makes sense. Thank you for looking. @conao3: Thank you! I agree with your analysis. I worry, however, that the approach in your patch leaves open the possibility of someone forgetting the check the return value in new code. What about changing the functions which may return |
Regarding this issue, may we decide our goal as PR to |
Yes, of course. |
posframe--create-posframe
explicitly bindsafter-make-frame-functions
tonil
. This currently breaks persp-mode (perspective-el), which uses frame parameters extensively. These parameters are initialized in a hook it adds toafter-make-frame-functions
, but are always missing from posframe frames.It would be a fairly large change to
persp-mode
to become more resilient to missing parameters, and I haven't run into problems with anything other than posframe. Is there a reason why posframe needs to avoid running frame creation hooks?The text was updated successfully, but these errors were encountered: