-
Notifications
You must be signed in to change notification settings - Fork 14
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
Ideas for wconfig and frameset restoration improvements #7
Comments
Hi Rob, My initial idea was that buffers ought to be addressable by a value so that a buffer's contents and position could be restored even if the buffer doesn't exist. It seems much like addressing a resource in a browser with a URL, so a URL seemed like an obvious candidate for encoding the value. Emacs has built-in URL libraries that make it pretty simple as well. Then I realized that the bookmarks system already provides a way to access many buffers' content. It's simple to encode a bookmark record into a URL as well. When using the However, URLs do seem like a natural candidate. As well, they may be useful for accessing in other ways, like in Org links (although I suppose they're flexible enough that a Lisp list could be written directly into the link rather than encoding it into a URL). I think the bottom line is that this is a very early version. I'm still exploring and experimenting. I might conclude that URLs aren't necessary, and we could just use Lisp lists instead. Or URLs might be useful enough to keep using them. I'm open to feedback on this, of course. Thanks. |
Thanks, I got here to ask why don't we use a/p-lists for this :)
as links - sure, but I still think to store them internally structured lists look like a more natural way to |
The latest version of burly works for me on Emacs 27.1 without a problem. I understand your URL rationale now, notably that there was a library function that made URLs easy for you to parse rather than there being any connection to the web. I think in that case moving away from URLs makes sense and instead using sexps which solve your parsing problem also makes sense. In fact, there is an older library called revive+.el (package = revive-plus, but you have to manually download it) that persists both window configs and framesets and uses sexps to store but does not have the bookmark interface. Despite its age, it also worked out of the box for me. Check it out: revive-plus I hope you will utilize that since it is built atop the revive.el you already use and it would extend burly to frameset handling as well as escreen session saving and thereby fulfill issue #8 . I would suggest you include in with burly since it is not on elpa or melpa. |
My interest in burly is mainly to provide a simple library with few dependencies to save and restore window configs and framesets via Hyperbole buttons. Since Hyperbole implicit buttons can already invoke Elisp functions, a simple: <burly-open-bookmark "Burly: my-wconfig"> in any text can restore a burly bookmark. it would be easy to simplify this syntax to something like: <burly: my-wconfig> or anything else desired as well. |
For use purely within Emacs, yes. However, URLs may prove useful for use from outside of Emacs to access files or buffers within Emacs. Of course, this is yet to be implemented, and it would need careful consideration with regard to security. Anyway, the current code encodes and decodes alists to/from URLs without any problems that I'm aware of, so I'll probably leave that as-is unless and until I decide to abandon URLs completely. Rob:
Great, thanks.
I'm not sure what parsing problem you mean. AFAIK they are working well.
Actually, until yesterday, Burly used code borrowed from revive.el. I copied only the functions from it that were needed and renamed the symbols, putting them in the file So, thanks to Clemens' pointing me to some other Emacs functions, I replaced all of the code from revive.el with a few lines of code that does the same thing using newer Emacs functions (and since that old code was under a different license, I squashed the old commits and force-pushed to For restoring multiple frames, I think it shouldn't be difficult to use similar frame-related functions to do so. I don't think that code from revive-plus will be necessary. That idea's being tracked in #8. I'm not sure about escreen session saving (I don't even know what escreen is, though it sounds familiar). Regarding your Hyperbole syntax, I don't think you need a special |
On Oct 27, 2020, at 8:59 AM, alphapapa ***@***.***> wrote:
as links - sure, but I still think to store them internally structured lists look like a more natural way to
For use purely within Emacs, yes. However, URLs may prove useful for use from outside of Emacs to access files or buffers within Emacs. Of course, this is yet to be implemented, and it would need careful consideration with regard to security. Anyway, the current code encodes and decodes alists to/from URLs without any problems that I'm aware of, so I'll probably leave that as-is unless and until I decide to abandon URLs completely.
Rob:
The latest version of burly works for me on Emacs 27.1 without a problem.
Great, thanks.
I understand your URL rationale now, notably that there was a library function that made URLs easy for you to parse rather than there being any connection to the web. I think in that case moving away from URLs makes sense and instead using sexps which solve your parsing problem also makes sense.
I'm not sure what parsing problem you mean. AFAIK they are working well.
Ok, I see.
In fact, there is an older library called revive+.el (package = revive-plus, but you have to manually download it) that persists both window configs and framesets and uses sexps to store but does not have the bookmark interface. Despite its age, it also worked out of the box for me.
Check it out: revive-plus
I hope you will utilize that since it is built atop the revive.el you already use and it would extend burly to frameset handling as well as escreen session saving and thereby fulfill issue #8 . I would suggest you include in with burly since it is not on elpa or melpa.
Actually, until yesterday, Burly used code borrowed from revive.el. I copied only the functions from it that were needed and renamed the symbols, putting them in the file burly-revive.el. However, 1. the code was BSD-licensed, and I'd prefer to keep all code in the project under one license, and 2. it had a bug that caused buffers to be restored to the wrong window sometimes.
So, thanks to Clemens' pointing me to some other Emacs functions, I replaced all of the code from revive.el with a few lines of code that does the same thing using newer Emacs functions (and since that old code was under a different license, I squashed the old commits and force-pushed to master to remove the BSD-licensed code from the repo). See #3
This is great news. I was actually going to ask you to consider doing so since I try to minimize dependencies when interfacing any package to Hyperbole.
For restoring multiple frames, I think it shouldn't be difficult to use similar frame-related functions to do so. I don't think that code from revive-plus will be necessary. That idea's being tracked in #8.
Ok.
I'm not sure about escreen session saving (I don't even know what escreen is, though it sounds familiar).
This lets you keep multiple remote terminal sessions going in the background that you can reattach to, I believe, so revive+ would save and restore sessions. I certainly don’t need that.
Regarding your Hyperbole syntax, I don't think you need a special burly link type, because Burly bookmarks are standard Emacs bookmarks that can be opened with standard bookmark commands. But you could make one that allows omitting the burly-bookmark-prefix if you wanted.
Right. The button type I showed is built in to Hyperbole.
Impressed that your writing a burly manual as well. This could come out winderfully.
|
Yeah, I'd prefer not to support that directly. If someone needs that, maybe we could implement some hooks that would allow extensibility. Or maybe the existing
The Info manual is just an export of the |
@alphapapa I understand now the use case of urls and I agree that storing urls in org-files is a reasonable use-case. However I wonder if there could be a more principled solution.
As an alternative one could consider having url-support in burly only for storing/loading from urls inside documents. This means there would be two different load/store mechanism - via bookmarks and via urls. |
Hi Adam:
In your burly.el commentary you explain that URL formatting is used to serialize window and frame configuration information to strings and that Emacs bookmarks are used to save and retrieve these strings. But you don't say anything about why URL conventions are used; that would be helpful. If it is future anticipated usage, talk a bit about what you envision.
The text was updated successfully, but these errors were encountered: