Skip to content
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

conflict with writeroom-mode #114

Closed
tshu-w opened this issue Mar 9, 2020 · 2 comments
Closed

conflict with writeroom-mode #114

tshu-w opened this issue Mar 9, 2020 · 2 comments

Comments

@tshu-w
Copy link

tshu-w commented Mar 9, 2020

If I enable writeroom-mode, split window, switch to another persp, and switch back. the persp-mode cannot load this perspective correctly.

before:
Screen Shot 2020-03-09 at 9 34 52 AM
after swich back:
Screen Shot 2020-03-09 at 9 35 07 AM

Debugger entered--Lisp error: (wrong-type-argument window-valid-p nil)
  set-window-combination-limit(nil t)
  window--state-put-2(t 718)
  window-state-put((((min-height . 4) (min-width . 20) (min-height-ignore . 3) (min-width-ignore . 8) (min-height-safe . 1) (min-width-safe . 4) (min-pixel-height . 72) (min-pixel-width . 160) (min-pixel-height-ignore . 54) (min-pixel-width-ignore . 64) (min-pixel-height-safe . 18) (min-pixel-width-safe . 32)) hc (pixel-width . 1268) (pixel-height . 718) (total-width . 158) (total-height . 39) (normal-height . 1.0) (normal-width . 1.0) (combination-limit . t) (leaf (pixel-width . 636) (pixel-height . 718) (total-width . 79) (total-height . 39) (normal-height . 1.0) (normal-width . 0.501577287066246) (buffer "gtd.org" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 t) (vscroll . 0) (dedicated) (point . 23434) (start . 1))) (leaf (last . t) (pixel-width . 632) (pixel-height . 718) (total-width . 79) (total-height . 39) (normal-height . 1.0) (normal-width . 0.49842271293375395) (buffer "gtd.org" (selected) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 t) (vscroll . 0) (dedicated) (point . 23434) (start . 1)))) #<window 3 on gtd.org> t)
  (progn (window-state-put pwc rwin t))
  (if (fboundp (quote window-state-put)) (progn (window-state-put pwc rwin t)))
  (when (fboundp (quote window-state-put)) (window-state-put pwc rwin t))
  (progn (when (fboundp (quote window-state-put)) (window-state-put pwc rwin t)))
  (if (or rwin (setq rwin (frame-root-window (or frame (selected-frame))))) (progn (when (fboundp (quote window-state-put)) (window-state-put pwc rwin t))))
  (when (or rwin (setq rwin (frame-root-window (or frame (selected-frame))))) (when (fboundp (quote window-state-put)) (window-state-put pwc rwin t)))
  (lambda (pwc &optional frame rwin) (when (or rwin (setq rwin (frame-root-window (or frame (selected-frame))))) (when (fboundp (quote window-state-put)) (window-state-put pwc rwin t))))((((min-height . 4) (min-width . 20) (min-height-ignore . 3) (min-width-ignore . 8) (min-height-safe . 1) (min-width-safe . 4) (min-pixel-height . 72) (min-pixel-width . 160) (min-pixel-height-ignore . 54) (min-pixel-width-ignore . 64) (min-pixel-height-safe . 18) (min-pixel-width-safe . 32)) hc (pixel-width . 1268) (pixel-height . 718) (total-width . 158) (total-height . 39) (normal-height . 1.0) (normal-width . 1.0) (combination-limit . t) (leaf (pixel-width . 636) (pixel-height . 718) (total-width . 79) (total-height . 39) (normal-height . 1.0) (normal-width . 0.501577287066246) (buffer "gtd.org" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 t) (vscroll . 0) (dedicated) (point . 23434) (start . 1))) (leaf (last . t) (pixel-width . 632) (pixel-height . 718) (total-width . 79) (total-height . 39) (normal-height . 1.0) (normal-width . 0.49842271293375395) (buffer "gtd.org" (selected) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 t) (vscroll . 0) (dedicated) (point . 23434) (start . 1)))) #<frame [email protected] 0x102a2f438>)
  persp-restore-window-conf(#<frame [email protected] 0x102a2f438> nil nil)
  #f(compiled-function (persp &rest --cl-rest--) #<bytecode 0x43b2f53d>)(nil #<frame [email protected] 0x102a2f438>)
  apply(#f(compiled-function (persp &rest --cl-rest--) #<bytecode 0x43b2f53d>) (nil #<frame [email protected] 0x102a2f438>))
  persp-activate(nil #<frame [email protected] 0x102a2f438>)
  persp-frame-switch("Default" #<frame [email protected] 0x102a2f438>)
  #f(compiled-function (name &optional frame &rest --cl-rest--) "Switch to the perspective with name `NAME'.\nIf there is no perspective with that name it will be created.\nReturn `NAME'." (interactive "i") #<bytecode 0x4394e2e9>)("Default")
  apply(#f(compiled-function (name &optional frame &rest --cl-rest--) "Switch to the perspective with name `NAME'.\nIf there is no perspective with that name it will be created.\nReturn `NAME'." (interactive "i") #<bytecode 0x4394e2e9>) "Default")
  persp-switch("Default")
  (if persp-to-switch (persp-switch persp-to-switch) (persp-switch nil))
  (let ((persp-to-switch (nth pos (persp-names-current-frame-fast-ordered)))) (if persp-to-switch (persp-switch persp-to-switch) (persp-switch nil)))
  switch-persp-by-pos(0)
  switch-to-persp-1()
  funcall-interactively(switch-to-persp-1)
  call-interactively(switch-to-persp-1 nil nil)
  command-execute(switch-to-persp-1)

If you need more info, please tell me.

@joostkremers
Copy link

Hi, I'm the maintainer of writeroom-mode. I just noticed issue #110, which indicates there's also a conflict with another package of mine, visual-fill-column-mode. Since the problem description seems similar and because visual-fill-column-mode is used by writeroom-mode to set the margins, the two issues may well be related.

The backtrace posted by @tshu-w doesn't point to any code from writeroom-mode or visual-fill-column-mode, so I can't really help interpreting it. But if it turns out that either of my packages does something weird that trips up persp-mode, I'd be happy to help and figure out how it should be fixed.

@tshu-w
Copy link
Author

tshu-w commented May 6, 2020

it’s not issue(caused by writeroom-maximize-window t). @joostkremers BTW, thank you for your enthusiastic help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants