Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Process buffers are not restorable #30

Closed
tumashu opened this issue Mar 29, 2021 · 6 comments
Closed

Process buffers are not restorable #30

tumashu opened this issue Mar 29, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@tumashu
Copy link

tumashu commented Mar 29, 2021

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  get-buffer(nil)
  window--state-put-2(nil 818)
  window-state-put((((min-height . 20) (min-width . 60) (min-height-ignore . 4) (min-width-ignore . 4) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-height . 440) (min-pixel-width . 600) (min-pixel-height-ignore . 88) (min-pixel-width-ignore . 40) (min-pixel-height-safe . 44) (min-pixel-width-safe . 20)) vc (pixel-width . 1600) (pixel-height . 818) (total-width . 160) (total-height . 37) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 1600) (pixel-height . 400) (total-width . 160) (total-height . 18) (normal-height . 0.5) (normal-width . 1.0) (parameters (burly-url . "emacs+burly+bookmark://gywjw-einvoice.py?filename=...")) (buffer #<buffer gywjw-einvoice.py> (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 1) (start . 1)) (prev-buffers ("*Org Agenda*" 1 19) ("winner.el.gz" 11098 11650) ("*scratch*" 1 1))) (leaf (last . t) (pixel-width . 1600) (pixel-height . 418) (total-width . 160) (total-height . 19) (normal-height . 0.5) (normal-width . 1.0) (parameters (burly-url . "emacs+burly+name://?*Python*")) (buffer nil (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 190) (start . 1)) (prev-buffers ("*Org Agenda*" 1 19)))) #<window 37 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.%2020%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.%2020%...")
  burly-bookmark-handler(("burly:python" (url . "emacs+burly+windows:?%28%28%28min-height%20.%2020%...") (handler . burly-bookmark-handler)))
  bookmark-handle-bookmark("burly:python")
  bookmark--jump-via("burly:python" pop-to-buffer-same-window)
  bookmark-jump("burly:python")
  burly-open-bookmark("burly:python")
  (let* ((n (- (length bookmarks) 1)) (pos (or eh-burly-bookmark-position 0)) (bookmark (nth pos bookmarks))) (burly-open-bookmark bookmark) (message "Revert to bookmark: %S" bookmark) (setq eh-burly-bookmark-position (if (>= pos n) 0 (1+ pos))))
  (if bookmarks (let* ((n (- (length bookmarks) 1)) (pos (or eh-burly-bookmark-position 0)) (bookmark (nth pos bookmarks))) (burly-open-bookmark bookmark) (message "Revert to bookmark: %S" bookmark) (setq eh-burly-bookmark-position (if (>= pos n) 0 (1+ pos)))) (burly-bookmark-windows "burly:0") (message "Create bookmark: burly:0") (setq eh-burly-bookmark-position nil))
  (let ((bookmarks (burly-bookmark-names))) (if bookmarks (let* ((n (- (length bookmarks) 1)) (pos (or eh-burly-bookmark-position 0)) (bookmark (nth pos bookmarks))) (burly-open-bookmark bookmark) (message "Revert to bookmark: %S" bookmark) (setq eh-burly-bookmark-position (if (>= pos n) 0 (1+ pos)))) (burly-bookmark-windows "burly:0") (message "Create bookmark: burly:0") (setq eh-burly-bookmark-position nil)))
  eh-burly-open-bookmark()
  funcall-interactively(eh-burly-open-bookmark)
  command-execute(eh-burly-open-bookmark)
tumashu added a commit to tumashu/burly.el that referenced this issue Mar 30, 2021
* burly.el (burly-default-buffer): New variable.
(burly--bufferize-window-state): use `burly-default-buffer'.
@alphapapa
Copy link
Owner

Thanks for the backtrace. Can you figure out why the error occurs? What about that buffer makes it seem to be unrestoreable? Can you reproduce the problem in a clean Emacs config with only Burly installed?

@alphapapa alphapapa added the bug Something isn't working label Mar 31, 2021
@tumashu
Copy link
Author

tumashu commented Apr 1, 2021

  1. open a python file.
  2. C-c C-p open python buffer
  3. burly bookmark window as burly:test
  4. kill python buffer
  5. burly open bookmark burly:test will error.

@tumashu
Copy link
Author

tumashu commented Apr 1, 2021

Can you reproduce the problem in a clean Emacs config with only Burly installed?

emacs -Q can reproduce this problem

@alphapapa
Copy link
Owner

So by "Python buffer" you mean a Python process buffer, not a buffer containing Python code.

And rather than fix the problem of Python process buffers being unrestorable, you'd rather that the scratch buffer be restored in its place.

I would rather attempt to make process buffers properly restorable.

@alphapapa alphapapa changed the title Error when restore python buffer. Process buffers are not restorable Apr 1, 2021
@tumashu
Copy link
Author

tumashu commented Apr 1, 2021

Python process buffer is an example, we can add support to it, but we can not add support to all special mode...

@alphapapa
Copy link
Owner

AFAIK Burly should now restore such a window configuration with a warning rather than an error.

@tumashu What do you think? Thanks.

Repository owner locked and limited conversation to collaborators Jun 22, 2024
@alphapapa alphapapa converted this issue into discussion #70 Jun 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants