-
Notifications
You must be signed in to change notification settings - Fork 22
Refactor: Begun, the setq wars have #173
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
base: main
Are you sure you want to change the base?
Conversation
|
The one concern I have with this PR is XIM: I don't use it, haven't tested my changes, and am a bit scared of trying to configure it given all the bug reports I've seen. |
cea2f7c to
a278dab
Compare
|
I think we should tag a xelb release first before starting to use |
|
Otherwise I am fine with overhauling the code like this. I'd suggest to first merge the trivial commits, e.g., only the |
438f5dc to
2e174a7
Compare
SGTM.
I broke out the remaining "larger" changes from the first commit:
|
|
I went ahead and tagged a new XELB release. IMO, we had enough changes and bug fixes there to warrant one anyways. |
2e174a7 to
76fa15a
Compare
|
I've merged the first few commits, but none of the larger refactors. I'll wait a few days before merging the rest. |
Thanks, I was about to suggest this. Yes, please wait a few days and check if all is well in your setup. But then given that the commits are fine-grained we can easily diagnose. We should also bump the Xelb version requirement, in case you haven't done that already. I've seen that the new Xelb version landed on GNU ELPA. |
866fc9c to
2b203c7
Compare
|
I've pushed everything except:
|
Regarding XIM - I also don't use it and don't have immediate plans to do. I could maybe try it out just out of curiosity, but there are so many things to do ... If you don't feel comfortable with the changes and can live with some uncleanliness in the exwm-xim file we can leave it as is, and preserve this commit as an open PR?
Would it make sense to split this commit up? Maybe remove the Chesterton fence in a first separate commmit, just to simplify potential future bisection? As a general guideline, which I try to follow, I usually separate functional changes from pure reorganization, which should preserve behavior exactly. |
2b203c7 to
d7ac975
Compare
I feel relatively comfortable with the changes to XIM, they're pretty straight-forward.
I've split it into several commits. Unfortunately, I had to make the fixes first before the rewrite because preserving the minimum width/height delta in the rewrite was too much work. |
This makes it easier to trace where variables are used/set. * exwm-xim.el (exwm-xim--on-SelectionRequest): (exwm-xim--on-ClientMessage-0): (exwm-xim--on-ClientMessage): (exwm-xim--make-request): Prefer let over setq.
Instead of binding a `req' variable around the entire function, decode and bind request slots directly where they're used. * exwm-xim.el (exwm-xim--on-request): Refactor for readability.
d7ac975 to
f719e87
Compare
|
I've merged everything except the XIM changes now. |
This PR contains a bunch of related changes following on from the introduction of `xcb:unmarshal-new' in XELB. I suggest reading the individual commits and messages, but the main goal is to make the code more readable by avoiding the C-like declare-then-set pattern and instead bind values directly where possible.
The last commit also has some fixes and behavioral changes.
I'm submitting this as a PR because it's very large and don't want to clobber any other work in progress without warning.