Open gagbo opened 3 years ago
Hi Gerry,
I'm not sure I understand. Why would posframes be getting saved, especially ones from ivy-posframe
? I must be missing something.
Anyway, do you mean that there's an un-read
-able value in one of the frame or window parameters? If so, we should probably filter it out, unless it's absolutely necessary to restore it, in which case we'd have to figure out a workaround. I'd rather avoid adding workarounds for specific params though, so only if absolutely necessary. :)
I'm not sure I understand. Why would posframes be getting saved, especially ones from
ivy-posframe
? I must be missing something.
I agree that they shouldn't be saved. I think it's saved because when I hit RET
to give the burly-frames bookmark name, the posframe is still present. Is there a way to filter it out in burly-frames-url
?
Anyway, do you mean that there's an un-
read
-able value in one of the frame or window parameters? If so, we should probably filter it out, unless it's absolutely necessary to restore it, in which case we'd have to figure out a workaround. I'd rather avoid adding workarounds for specific params though, so only if absolutely necessary. :)
I think that's the issue. From what I see, the possible culprits are :
(better-jumper-struct . #s(better-jumper-jump-list-struct (0 0 . [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]) -1))
but I think it's cool to have the jump history restored. I can definitely live without it though(posframe-parent-buffer \"*doom*\" . #<buffer *doom*>)
A predicate function to filter frames out of burly-frames-url
would allow me to tinker with it and find a way to ignore posframes / childframes in general (company-box also uses childframes and they should be filtered out imo)(bufler-workspace-path-formatted . #(\"emacs_rs\" 0 8 (face outline-1)))
I need the bufler workspaces to be saved, but only the -formatted
one seems to be an issue.Maybe a solution would be to check on save (during bufler-frames-url
) whether the representation of a parameter starts with #
, and ignore it at that point (maybe adding a warning in *Messages*
to tell that those variables can't be saved because they just can't be restored)
I'm not sure I understand. Why would posframes be getting saved, especially ones from
ivy-posframe
? I must be missing something.I agree that they shouldn't be saved. I think it's saved because when I hit
RET
to give the burly-frames bookmark name, the posframe is still present. Is there a way to filter it out inburly-frames-url
?
Yeah, that explains it. Well, I guess we'll have to add something like burly-frame-predicate
to filter out certain frames before they're saved.
Anyway, do you mean that there's an un-
read
-able value in one of the frame or window parameters? If so, we should probably filter it out, unless it's absolutely necessary to restore it, in which case we'd have to figure out a workaround. I'd rather avoid adding workarounds for specific params though, so only if absolutely necessary. :)I think that's the issue. From what I see, the possible culprits are : ...
(posframe-parent-buffer \"*doom*\" . #<buffer *doom*>)
That's almost certainly the problem, because buffers can't be read. I guess that filtering out the posframe will solve that problem as well, but in case it doesn't, you should be able to filter out that frame parameter already using the existing option.
Maybe a solution would be to check on save (during
bufler-frames-url
) whether the representation of a parameter starts with#
, and ignore it at that point (maybe adding a warning in*Messages*
to tell that those variables can't be saved because they just can't be restored)
I don't think that would be correct, because not all values with #
-prefixed printable syntax are unreadable.
BTW, there is already code to remove buffers from properties in bookmarks, but it must not be catching the one that's causing this.
https://github.com/alphapapa/burly.el/blob/7c03d63500b3164d157f5760619e25d731d68802/burly.el#L359
BTW, there is already code to remove buffers from properties in bookmarks, but it must not be catching the one that's causing this.
That's because the value is not a buffer but a pair which cdr is a buffer. So I need to add it in the blacklist of parameters
If necessary, okay, but we should probably filter out posframes instead.
Oh sure, for posframes filtering the whole frame is the solution, I was thinking about other packages that later might use the same trick
Before the gnarly backtrace, what I think happens. (I'm on 7c03d63)
I have a
invalid read syntax #
error when I try to restore frames with burly but it worked when I "only" save windows.I dig up the backtrace and I think the issue is with the posframe-buffer frame-parameters (
posframe-buffer
posframe-parent-buffer
), which are stored directly in theirprinc
forms. Either that or still the better-jumper (better-jumper-struct
) issue of #12, or thebufler-workspace-path-formatted
. Or thename
of the framesDon't hesitate to search for the
parameters
in the page, otherwise it's kind of hard to see where the issues areThe url I tried to restore :
The
lisp objectstring that goes intoread
, manually formatted