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

add support for zone.el #134

Merged
merged 1 commit into from
Feb 6, 2019
Merged

add support for zone.el #134

merged 1 commit into from
Feb 6, 2019

Conversation

deb0ch
Copy link
Contributor

@deb0ch deb0ch commented Sep 26, 2018

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.

@coveralls
Copy link

coveralls commented Sep 26, 2018

Coverage Status

Coverage decreased (-12.3%) to 71.676% when pulling 7b72978 on deb0ch:master into 2b64095 on bmag:master.

@deb0ch
Copy link
Contributor Author

deb0ch commented Sep 26, 2018

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 😸

@bmag
Copy link
Owner

bmag commented Sep 26, 2018

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.

@deb0ch
Copy link
Contributor Author

deb0ch commented Oct 3, 2018

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 😁

@deb0ch
Copy link
Contributor Author

deb0ch commented Nov 8, 2018

Just did what you said, it worked like a charm 👍✨

I even used it for integrating vterm 😸

@deb0ch
Copy link
Contributor Author

deb0ch commented Nov 8, 2018

Though I have no idea why I'm getting errors when naming the purpose zone instead of Zone 😕

@deb0ch
Copy link
Contributor Author

deb0ch commented Feb 2, 2019

Ping ?

@bmag bmag merged commit 7b72978 into bmag:master Feb 6, 2019
@bmag
Copy link
Owner

bmag commented Feb 6, 2019

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 of Zone

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.

@deb0ch
Copy link
Contributor Author

deb0ch commented Feb 7, 2019

Yay ! Thank you for everything 👍✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants