Closed deb0ch closed 5 years ago
Just haven't written a test yet but I'm not sure how to test this and don't have time for exploring too much, it would be great if you could give me some hints in that matter 😸
Have you tried:
(purpose-set-extension-configuration
:zone
(purpose-conf "zone" :name-purposes `(("*zone*" . Zone))))
(add-to-list 'purpose-special-action-sequences '(Zone display-buffer-same-window))
Adding it as fix in window-purpose-fixes.el
, wrapped in with-eval-after-load
, makes much more sense. You can see how the guide-key and which-key fixes are implemented as examples (purpose--fix-guide-key
, purpose--fix-which-key
). I'm ok with not adding a test.
P.S. You know I'm not going to modify the core (window-purpose-core.el
) just to handle Zone as a special case, right?
P.P.S from my fast reply you'd think this really is an important feature, but actually that's because of good timing of the PR and the fix being easy.
Thank you for the tip, and no I did not try this or even knew something like this existed 😅I will try it like that and update my PR if it works (next time I have a period of nothing-to-do-at-work)
I don't know if you're willing to modify the core for Zone, yes Zone is a completely funny but useless feature but on the other hand it is integrated to Emacs itself so it's not like it's a completely random exotic package used by 3 randos 😸
I wouldn't think it is an important feature, I'm more like convinced it is the most central feature introduced in Emacs-purpose to this day 😁
Just did what you said, it worked like a charm :thumbsup::sparkles:
I even used it for integrating vterm
😸
Though I have no idea why I'm getting errors when naming the purpose zone
instead of Zone
😕
Ping ?
Merged, and I also took the opportunity to replace eval-after-load
with with-eval-after-load
.
getting errors when naming the purpose
zone
instead ofZone
Well, that's because zone
is a valid function, so in purpose-special-action-sequences
Purpose thinks it's a predicate function and not a symbol denoting a purpose.
Yay ! Thank you for everything 👍✨
Hey !
Just realised that I wrote this but never PRed it 😅
I am basically adding support for zone.el, because else when Emacs starts zoning out the zone buffer does not appear at the right place and everything seems off.
This is undoubtably Emacs' and Purpose's most important feature to this day.