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

Deleted buffers in bookmark prevent burly from opening bookmark #49

Closed ParetoOptimalDev closed 11 months ago

ParetoOptimalDev commented 2 years ago

My test was:

Maybe this is expected and users should have on desktop-save-mode?

Maybe this package assumes the workflow of using emacs-server?

I think this error would still happen if the user bookmarked a window with something desktop-save-mode doesn't restore like an eshell buffer.

specs

emacs 27 burly 20211005.1159

traceback

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  get-buffer(nil)
  window--state-put-2(nil 963)
  window-state-put((((min-height . 4) (min-width . 20) (min-height-ignore . 2) (min-width-ignore . 16) (min-height-safe . 1) (min-width-safe . 4) (min-pixel-height . 64) (min-pixel-width . 120) (min-pixel-height-ignore . 32) (min-pixel-width-ignore . 96) (min-pixel-height-safe . 16) (min-pixel-width-safe . 24)) hc (pixel-width . 1916) (pixel-height . 963) (total-width . 319) (total-height . 60) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 956) (pixel-height . 963) (total-width . 159) (total-height . 60) (normal-height . 1.0) (normal-width . 0.5) (parameters (burly-url . "emacs+burly+bookmark://burly.el?filename=%22%2Fnix...")) (buffer #<buffer burly.el> (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 1) (start . 1)) (prev-buffers ("burly.el" 1 1) ("*scratch*" 1 146))) (leaf (last . t) (pixel-width . 960) (pixel-height . 963) (total-width . 160) (total-height . 60) (normal-height . 1.0) (normal-width . 0.5) (parameters (burly-url . "emacs+burly+name://?*Org Agenda*")) (buffer nil (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 149) (start . 1)) (prev-buffers ("*Org Agenda*" 1 149)))) #<window 15 on  *temp*>)
  burly--windows-set(#s(url :type "emacs+burly+windows" :user nil :password nil :host nil :portspec nil :filename "?%28%28%28min-height%20.%204%29%20%28min-width%20...." :target nil :attributes nil :fullness nil :silent nil :use-cookies t :asynchronous t))
  burly-open-url("emacs+burly+windows:?%28%28%28min-height%20.%204%2...")
  burly-bookmark-handler(("Burly: foo" (url . "emacs+burly+windows:?%28%28%28min-height%20.%204%2...") (handler . burly-bookmark-handler)))
  bookmark-handle-bookmark("Burly: foo")
  bookmark--jump-via("Burly: foo" pop-to-buffer-same-window)
  bookmark-jump("Burly: foo")
  burly-open-bookmark("Burly: foo")
  funcall-interactively(burly-open-bookmark "Burly: foo")
  call-interactively(burly-open-bookmark record nil)
  command-execute(burly-open-bookmark record)
  execute-extended-command(nil "burly-open-bookmark" nil)
  funcall-interactively(execute-extended-command nil "burly-open-bookmark" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
alphapapa commented 2 years ago

Org Agenda buffers cannot be restored by Burly. (Trying to support that would require a lot of nasty hacks, because Org Agenda is not designed that way. That's one of the reasons I wrote org-ql, whose search/view buffers are restorable by Burly, as well as linkable with Org links, etc.)

I don't know why you are getting this error; you should get a warning instead, and the rest of the bookmarked windows (if there are any) should be restored. Maybe it's because you only bookmarked one window. I'll have to look into that when I have time. Thanks.

ParetoOptimalDev commented 2 years ago

Org Agenda buffers cannot be restored by Burly. (Trying to support that would require a lot of nasty hacks, because Org Agenda is not designed that way. That's one of the reasons I wrote org-ql, whose search/view buffers are restorable by Burly, as well as linkable with Org links, etc.)

I don't know why you are getting this error; you should get a warning instead, and the rest of the bookmarked windows (if there are any) should be restored. Maybe it's because you only bookmarked one window. I'll have to look into that when I have time. Thanks.

No problem. I'll also try using org-ql again since I think it's ideal for me. Last time I think date handling or some ordering prevented me from totally switching over.

I'll create issues if that's still the case.

alphapapa commented 2 years ago

Please don't close this issue. As I said, I still need to look into it:

I don't know why you are getting this error; you should get a warning instead, and the rest of the bookmarked windows (if there are any) should be restored. Maybe it's because you only bookmarked one window. I'll have to look into that when I have time. Thanks.

alphapapa commented 11 months ago

I think this is solved. Please open a new issue if it happens again.