8000 Emacs -nw seems lead to "Window too small to accommodate state" sometimes · Issue #56 · alphapapa/activities.el · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Emacs -nw seems lead to "Window too small to accommodate state" sometimes #56

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

Closed
jellelicht opened this issue Mar 26, 2024 · 1 comment

Comments

@jellelicht
Copy link

(Vague) reproducer:
Have activities-mode enabled.
Define an activity using GUI emacs.
Close emacs.
Start emacs -nw on a terminal emulator.
(optional: run eval-buffer in activities.el)
Run activities-list (or resume), activate the recently-defined activity.
You get the following backtrace:

Debugger entered--Lisp error: (error "Window #<window 8 on *scratch*> too small to accom...")
  error("Window %s too small to accommodate state" #<window 8 on *scratch*>)
  window-state-put((((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 2) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 92) (min-pixel-width . 100) (min-pixel-height-ignore . 69) (min-pixel-width-ignore . 20) (min-pixel-height-safe . 23) (min-pixel-width-safe . 20)) leaf (parameters (activities-buffer . #s(activities-buffer :bookmark ("init.el" (filename . "~/.config/emacs/init.el") (front-context-string . "\n(use-package us") (rear-context-string . "ire 'el-patch))\n") (position . 153) (last-modified 26114 36303 12855 111000) (defaults "init.el")) :filename "/home/jlicht/.config/emacs/init.el" :name "init.el" :local-variables nil :etc ((indirectp) (narrowedp))))) (pixel-width . 956) (pixel-height . 1003) (total-width . 96) (total-height . 44) (normal-height . 1.0) (normal-width . 1.0) (buffer #<buffer init.el> (selected . t) (hscroll . 0) (fringes 0 0 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 153) (start . 1))) #<window 5>)
  (closure ((state ((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 2) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 92) (min-pixel-width . 100) (min-pixel-height-ignore . 69) (min-pixel-width-ignore . 20) (min-pixel-height-safe . 23) (min-pixel-width-safe . 20)) leaf (parameters (activities-buffer . #s(activities-buffer :bookmark ("init.el" (filename . "~/.config/emacs/init.el") (front-context-string . "\n(use-package us") (rear-context-string . "ire 'el-patch))\n") (position . 153) (last-modified 26114 36303 12855 111000) (defaults "init.el")) :filename "/home/jlicht/.config/emacs/init.el" :name "init.el" :local-variables nil :etc ((indirectp) (narrowedp))))) (pixel-width . 956) (pixel-height . 1003) (total-width . 96) (total-height . 44) (normal-height . 1.0) (normal-width . 1.0) (buffer #<buffer init.el> (selected . t) (hscroll . 0) (fringes 0 0 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 153) (start . 1)))) nil (window-state-put state (frame-root-window)))()
  apply((closure ((state ((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 2) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 92) (min-pixel-width . 100) (min-pixel-height-ignore . 69) (min-pixel-width-ignore . 20) (min-pixel-height-safe . 23) (min-pixel-width-safe . 20)) leaf (parameters (activities-buffer . #s(activities-buffer :bookmark ("init.el" ... ... ... ... ... ...) :filename "/home/jlicht/.config/emacs/init.el" :name "init.el" :local-variables nil :etc (... ...)))) (pixel-width . 956) (pixel-height . 1003) (total-width . 96) (total-height . 44) (normal-height . 1.0) (normal-width . 1.0) (buffer #<buffer init.el> (selected . t) (hscroll . 0) (fringes 0 0 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 153) (start . 1)))) nil (window-state-put state (frame-root-window))) nil)
  timer-event-handler([t 26114 36322 468784 nil (closure ((state ((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 2) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 92) (min-pixel-width . 100) (min-pixel-height-ignore . 69) (min-pixel-width-ignore . 20) (min-pixel-height-safe . 23) (min-pixel-width-safe . 20)) leaf (parameters (activities-buffer . #s(activities-buffer :bookmark ... :filename "/home/jlicht/.config/emacs/init.el" :name "init.el" :local-variables nil :etc ...))) (pixel-width . 956) (pixel-height . 1003) (total-width . 96) (total-height . 44) (normal-height . 1.0) (normal-width . 1.0) (buffer #<buffer init.el> (selected . t) (hscroll . 0) (fringes 0 0 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 153) (start . 1)))) nil (window-state-put state (frame-root-window))) nil nil 775000 nil])

I've locally worked around the issue by patching the following in activities--windows-set, but this may be more of a hack than a solution:

*** /tmp/ediffiSUjfY	2024-03-26 10:01:19.456778031 +0100
--- /tmp/ediffijbyJq	2024-03-26 10:01:19.456778031 +0100
***************
*** 12,15 ****
      (run-at-time nil nil
  		 (lambda nil
  		   (window-state-put state
! 				     (frame-root-window))))))
--- 12,16 ----
      (run-at-time nil nil
  		 (lambda nil
  		   (window-state-put state
! 				     (frame-root-window)
! 				     'safe)))))
@alphapapa
Copy link
Owner

Thanks!

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
0