alphapapa / burly.el

Save and restore frames and windows with their buffers in Emacs
GNU General Public License v3.0
303 stars 14 forks source link

Unbound frame-width error, trying to restore burly bookmark #5

Closed rswgnu closed 3 years ago

rswgnu commented 3 years ago

Hi Adam:

Using version 0.1-pre on Emacs 27.1 under MacOS, I get this traceback when trying to restore my first burly configuration using bookmark-jump:

Debugger entered--Lisp error: (void-variable frame-width) (burly-revive--normalize-edges frame-width frame-height edges) (let ((edges (burly-revive--normalize-edges frame-width frame-height edges)) (selected-window-edges (car (burly-revive--normalize-edges frame-width frame-height (list selected-window-edges)))) (x371 (car selected-window-edges)) (x372 (cdr selected-window-edges)) (x373 (car x372)) (x374 (cdr x372)) (x375 (car x374)) (x376 (cdr x374)) (x377 (car x376)) (x378 (cdr x376))) (let ((_bottom x377) (_right x375) (top x373) (left x371)) (progn (set-buffer (get-buffer-create "scratch")) (burly-revive--construct-window-configuration edges) (burly-revive--select-window-by-edge left top) (let ((--dolist-tail-- urls)) (while --dolist-tail-- (let ((url ...)) (let (...) (progn ... nil) (set-window-buffer ... new-buffer)) (other-window 1) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (progn (let ((edges (burly-revive--normalize-edges frame-width frame-height edges)) (selected-window-edges (car (burly-revive--normalize-edges frame-width frame-height (list selected-window-edges)))) (x371 (car selected-window-edges)) (x372 (cdr selected-window-edges)) (x373 (car x372)) (x374 (cdr x372)) (x375 (car x374)) (x376 (cdr x374)) (x377 (car x376)) (x378 (cdr x376))) (let ((_bottom x377) (_right x375) (top x373) (left x371)) (progn (set-buffer (get-buffer-create "scratch")) (burly-revive--construct-window-configuration edges) (burly-revive--select-window-by-edge left top) (let ((--dolist-tail-- urls)) (while --dolist-tail-- (let (...) (let ... ... ...) (other-window 1) (setq --dolist-tail-- ...)))))))) (let ((x379 (map-elt config ':frame-width)) (x380 (map-elt config ':frame-height)) (x381 (map-elt config ':edges)) (x382 (map-elt config ':urls)) (x383 (map-elt config ':selected-window-edges))) (progn (let ((edges (burly-revive--normalize-edges frame-width frame-height edges)) (selected-window-edges (car (burly-revive--normalize-edges frame-width frame-height (list selected-window-edges)))) (x371 (car selected-window-edges)) (x372 (cdr selected-window-edges)) (x373 (car x372)) (x374 (cdr x372)) (x375 (car x374)) (x376 (cdr x374)) (x377 (car x376)) (x378 (cdr x376))) (let ((_bottom x377) (_right x375) (top x373) (left x371)) (progn (set-buffer (get-buffer-create "scratch")) (burly-revive--construct-window-configuration edges) (burly-revive--select-window-by-edge left top) (let ((--dolist-tail-- urls)) (while --dolist-tail-- (let ... ... ... ...)))))))) burly-revive-restore-window-configuration((:frame-width 261 :frame-height 79 :edges ((0 0 89 26) (89 0 177 26) (177 0 265 26) (0 26 89 52) (89 26 177 52) (177 26 265 52) (0 52 89 78) (89 52 177 78) (177 52 265 78)) :urls ("emacs+burly+bookmark://burly.el?filename=%22~%2F.e..." "emacs+burly+bookmark://par-align.el?filename=%22~%..." "emacs+burly+file:///tmp/a.org?pos=34&outline-path=..." "emacs+burly+bookmark://hibtypes.el?filename=%22~%2..." "emacs+burly+bookmark://hib-org.el?filename=%22~%2F..." "emacs+burly+bookmark://Changes?filename=%22~%2FDro..." "emacs+burly+file:///Users/bk/Dropbox/BW-Personal/E..." "emacs+burly+bookmark://hact.el?filename=%22~%2FDro..." "emacs+burly+bookmark://hui.el?filename=%22~%2FDrop...") :selected-window-edges (0 0 89 26))) (let ((config (read query-string))) (burly-revive-restore-window-configuration config)) (let ((query-string x391)) (let ((config (read query-string))) (burly-revive-restore-window-configuration config))) (let ((val (url-path-and-query urlobj)) (x391 (cdr val))) (let ((query-string x391)) (let ((config (read query-string))) (burly-revive-restore-window-configuration config)))) burly--windows-set(#s(url :type "emacs+burly+windows" :user nil :password nil :host nil :portspec nil :filename "?(:frame-width 261 :frame-height 79 :edges ((0 0 8..." :target nil :attributes nil :fullness nil :silent nil :use-cookies t :asynchronous t)) (cond ((member subtype '("name" "file" "bookmark")) (pop-to-buffer (burly-url-buffer url))) ((equal subtype '"windows") (burly--windows-set urlobj)) (t (let ((x385 subtype)) (error "No clause matching %S'" x385)))) (let* ((subtype (car (last (split-string type "+" 'omit-nulls))))) (cond ((member subtype '("name" "file" "bookmark")) (pop-to-buffer (burly-url-buffer url))) ((equal subtype '"windows") (burly--windows-set urlobj)) (t (let ((x385 subtype)) (error "No clause matching%S'" x385))))) (let ((type x384)) (let ((subtype (car (last (split-string type "+" 'omit-nulls))))) (cond ((member subtype '("name" "file" "bookmark")) (pop-to-buffer (burly-url-buffer url))) ((equal subtype '"windows") (burly--windows-set urlobj)) (t (let ((x385 subtype)) (error "No clause matching `%S'" x385)))))) (let ((urlobj (url-generic-parse-url url)) (x384 (aref urlobj 1))) (let ((type x384)) (let* ((subtype (car (last (split-string type "+" ...))))) (cond ((member subtype '("name" "file" "bookmark")) (pop-to-buffer (burly-url-buffer url))) ((equal subtype '"windows") (burly--windows-set urlobj)) (t (let ((x385 subtype)) (error "No clause matching `%S'" x385))))))) burly-open-url("emacs+burly+windows:?(:frame-width 261 :frame-heig...") burly-bookmark-handler(("Burly: 33test" (url . "emacs+burly+windows:?(:frame-width 261 :frame-heig...") (handler . burly-bookmark-handler))) bookmark-handle-bookmark("Burly: 33test") bookmark--jump-via("Burly: 33test" pop-to-buffer-same-window) bookmark-jump("Burly: 33test")

alphapapa commented 3 years ago

Hi Rob,

Please see #2. Let me know if that doesn't fix it for you.

rswgnu commented 3 years ago

I installed via Quelpa so I should have the right map library, right? I will check it later though.

-- Bob

On Oct 24, 2020, at 2:22 PM, alphapapa notifications@github.com wrote:

 Hi Rob,

Please see #2. Let me know if that doesn't fix it for you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rswgnu commented 3 years ago

Yes, I have map V2.1.

alphapapa commented 3 years ago

I just tested installing on a clean Emacs config again:

  1. emacs-sandbox.sh -i quelpa-use-package.
  2. (require 'quelpa-use-package).
  3. (use-package burly :quelpa (burly :fetcher github :repo "alphapapa/burly.el")).
  4. M-x burly-bookmark-windows RET foo.
  5. C-x r b foo RET.

It worked without any errors. I also tried killing and restarting Emacs after installing Burly into that clean config, and those commands worked without errors.

The problem you're having is due to that pcase expansion, which uses the pattern provided by map 2.1. But if you have that version of map, and you installed with the quelpa-use-package form in the readme, I can't explain why you're having the problem. It works for me. :(