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

How to pass extra arguments to frameset-restore through burly-open-url ? #41

Open
gagbo opened this issue Aug 3, 2021 · 1 comment · May be fixed by #42
Open

How to pass extra arguments to frameset-restore through burly-open-url ? #41

gagbo opened this issue Aug 3, 2021 · 1 comment · May be fixed by #42
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gagbo
Copy link

gagbo commented Aug 3, 2021

Hello,

How would you augment the burly-open-url entrypoint somehow with the key values from frameset-restore at least ? I’m open to make the PR for it if we can agree on the plan.

My use case :
I’d like to reuse-frames when I open a burly frames URL, so that when I open the URL I don’t have a new frame appearing, but instead my current frame is replaced with the URL. Imagine that I open the URL directly from emacs-dashboard when I start Emacs, so I really just want to reuse the frame I just opened.

https://github.com/emacs-mirror/emacs/blob/3af9e84ff59811734dcbb5d55e04e1fdb7051e77/lisp/frameset.el#L1139-L1143

I don’t know yet if I’d want to pass extra keys or not, as I didn’t play a lot with the function for now. But it’d be nice to control a little more how the frame is opened. I thought about :

  • adding a lot of prefix args, but I already think it’s going to be a messy API
  • adding a lot of burly- custom variables that would be used throughout, with some default values. I think it’s the easiest way, and matches the "style" of burly-frameset-filter-alist et al. But the issue becomes about "how do I override the defaults for 1 call ?"; and I think the only way to deal with it would be to let-bind the variables in a wrapping function, which is fine for me.
  • storing extra information in the URL about how to open the URL later, but I thought it was a little too much work for the feature.

I hope I’m clear enough, and have a nice day,
Gerry

@alphapapa
Copy link
Owner

Hi Gerry,

Thanks, this is a good idea. Yes, I think having a custom option variable for each of the needed arguments to frameset-restore makes sense. Then users who need to change them for certain uses could bind the variables in a wrapping command, as you said.

@alphapapa alphapapa added the enhancement New feature or request label Aug 3, 2021
@gagbo gagbo linked a pull request Aug 3, 2021 that will close this issue
@alphapapa alphapapa self-assigned this Aug 31, 2023
@alphapapa alphapapa added this to the 0.4 milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants