alphapapa / burly.el

Save and restore frames and windows with their buffers in Emacs
GNU General Public License v3.0
301 stars 14 forks source link

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

Open gagbo opened 3 years ago

gagbo commented 3 years ago

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 :

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

alphapapa commented 3 years ago

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.