-
Notifications
You must be signed in to change notification settings - Fork 15
Add var to filter saved frames on bookmark-frames #24
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: master
Are you sure you want to change the base?
Conversation
|
It would probably be better to follow the example of Also, FYI, the following forms are equivalent: (unless (frame-parameter frame 'parent-frame)
t)
(not (frame-parameter frame 'parent-frame)) |
I wast thinking about making the predicate a lambda so anyone can write and combine conditions. The issue with When choosing if we should save the whole frame there are others parameters that might be relevant:
And I couldn't find a way to express all those posibilities using anything else than a lambda. Using a
I knew it was bad somehow, there were too many negations in my head to write it correctly. Thanks :) |
|
Ok, if you think those examples might happen in actual use, then we can use a predicate instead. Specifically, we should probably use a list of "negatory" predicates, and each frame should be tested against those predicates, and if any predicate returns non-nil, the frame should be rejected. What do you think? Thanks. |
|
The childframe part is pretty obvious since it happens with all posframe/childframe related packages (company-box, eldoc-box, ivy-posframe, its very likely helm variant, flycheck-posframe...) Not saving if the frame has a single tab could happen if I only want to save "complex" frame configurations automatically on a hook, and I know single tab frames aren't worth it. I'm planning to make yet another buffer grouping plugin (only difference with bufler would be to be able to assign multiple tags to a single buffer), and if I only have special buffers left in a "tag" I don't want to save the window configuration associated with this tag. For these cases I thought that leaving the possibility of writing a custom predicate function would be better. I can change the variable to be a list of "ignore" predicates for sure, and provide a small list of what I think would be common examples (i.e. childframes, and a "factory" that builds "ignore if |
If that's really the only difference from Bufler, why not open an issue on Bufler's repo and we can talk about implementing that paradigm in Bufler? I guess it might be as "easy" as making a version of
That sounds good. Thanks. |
|
Regarding that idea for Bufler, see alphapapa/bufler.el@d623605 |
Sure, I was just afraid it would be too big of a change given the way defgroups was handled |
bd93b94 to
96ca4c4
Compare
6303aad to
c6d6aae
Compare
96ca4c4 to
b837e52
Compare
This allows for example to not save childframes like the ones created by company-box and posframe Co-authored-by: Adam Porter <adam@alphapapa.net>
b837e52 to
4f53f91
Compare
This allows for example to not save childframes like the ones created by
company-box and posframe
Draft implementation because