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

Invalid burly url with better-jumper package #12

Closed tpeacock19 closed 3 years ago

tpeacock19 commented 3 years ago

I'm unsure what the reason is but i've run into an issue trying to use this package while also using better-jumper. I believe burly is attempting to save the jump history and its causing an 'End of file during parsing' error.

The better jumper history is saved in the burly bookmark as such:

"emacs+burly+windows:?(((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 5)
(min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 84) (min-pixel-width . 90) (min-pixel-height-ignore . 45)
(min-pixel-width-ignore . 43) (min-pixel-height-safe . 21) (min-pixel-width-safe . 18)) leaf (pixel-width . 1918)
(pixel-height . 1057) (total-width . 213) (total-height . 50) (normal-height . 1.0) (normal-width . 1.0) (parameters
(burly-url
. \"emacs+burly+bookmark://baal.el?filename=%22~%2F.config%2Femacs%2Fbaal.el%22&front-context-string=%22shell-quote-argu%22&rear-context-string=%22uery%20default%20%5C%22%20%28%22&position=208597&defaults=%28%22baal.el%22%29\")
(better-jumper-struct . #s(better-jumper-jump-list-struct (0 42 . [(\"/home/morpheus/.config/emacs/baal.el\" 83227
\"i5j1it\") (\"/home/morpheus/.config/emacs/baal.el\" 277747 \"mwq71b\") (\"/home/morpheus/.config/emacs/baal.el\" 287511
\"ei4coz\") (\"/home/morpheus/.config/emacs/baal.el\" 300238 \"e12c67\") (\"/home/morpheus/.config/emacs/baal.el\" 300821
\"bk8lvj\") (\"/home/morpheus/.config/emacs/baal.el\" 300984 \"j3fjmq\") (\"/home/morpheus/.config/emacs/baal.el\" 301320
\"39d39k\") (\"/home/morpheus/.config/emacs/baal.el\" 301467 \"4g2i7p\") (\"/home/morpheus/.config/emacs/baal.el\" 301553
\"4s7jxb\") (\"/home/morpheus/.config/emacs/baal.el\" 301831 \"2eb3lp\") (\"/home/morpheus/.config/emacs/baal.el\" 301862
\"z1ezgz\") (\"/home/morpheus/.config/emacs/baal.el\" 301907 \"1cbhbx\") (\"/home/morpheus/.config/emacs/baal.el\" 301943
\"6ehh4q\") (\"/home/morpheus/.config/emacs/baal.el\" 302175 \"80vt9k\") (\"/home/morpheus/.config/emacs/baal.el\" 302319
\"1py0uw\") (\"/home/morpheus/.config/emacs/baal.el\" 302394 \"e04mit\") (\"/home/morpheus/.config/emacs/baal.el\" 270507
\"ocd3ng\") (\"/home/morpheus/.config/emacs/baal.el\" 270433 \"l86jg3\") (\"/home/morpheus/.config/emacs/baal.el\" 270397
\"sdid2w\") (\"/home/morpheus/.config/emacs/baal.el\" 270359 \"gukbg4\") (\"/home/morpheus/.config/emacs/baal.el\" 270319
\"4rhvug\") (\"/home/morpheus/.config/emacs/baal.el\" 270211 \"43mq7b\") (\"/home/morpheus/.config/emacs/baal.el\" 270178
\"9gkhi0\") (\"/home/morpheus/.config/emacs/baal.el\" 270142 \"wvr0pq\") (\"/home/morpheus/.config/emacs/baal.el\" 270106
\"n3ome9\") (\"/home/morpheus/.config/emacs/baal.el\" 269790 \"pupeua\") (\"/home/morpheus/.config/emacs/baal.el\" 269764
\"7tfbk5\") (\"/home/morpheus/.config/emacs/baal.el\" 269743 \"x8aoum\") (\"/home/morpheus/.config/emacs/baal.el\" 269713
\"7fh6oa\") (\"/home/morpheus/.config/emacs/baal.el\" 269676 \"zb74cs\") (\"/home/morpheus/.config/emacs/baal.el\" 269641
\"kyuoqc\") (\"/home/morpheus/.config/emacs/baal.el\" 269617 \"hx63yz\") (\"/home/morpheus/.config/emacs/baal.el\" 269576
\"poe89o\") (\"/home/morpheus/.config/emacs/baal.el\" 269537 \"58tqjb\") (\"/home/morpheus/.config/emacs/baal.el\" 269504
\"16kq5d\") (\"/home/morpheus/.config/emacs/baal.el\" 269432 \"8mvals\") (\"/home/morpheus/.config/emacs/baal.el\" 5206
\"zkqbu0\") (\"/home/morpheus/.config/emacs/baal.el\" 6367 \"lsh8zp\") (\"/home/morpheus/.config/emacs/baal.el\" 6509
\"75bo18\") (\"/home/morpheus/.config/emacs/baal.el\" 195741 \"6jufkt\") (\"/home/morpheus/.config/emacs/baal.el\" 196102
\"30ez9n\") (\"/home/morpheus/.config/emacs/baal.el\" 208000 \"uv5hcj\") nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]) -1))) (buffer \"baal.el\" (selected . t) (hscroll . 0)
(fringes 8 8 nil nil) (margins 1) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 208597) (start
. 206873)) (prev-buffers (\"burly.el\" 11083 12930) (\"*scratch*\" 82 875) (\"*Scratch for emacs-lisp-mode*\" 1 386)))"

This is parsed by url-generic-parse-url into what I believe is the problematic expression. Note the better-jumper-struct parameter has an unescaped quotation.


#s(url "emacs+burly+windows" nil nil nil nil "?(((min-height . 4) (min-width
. 10) (min-height-ignore . 3) (min-width-ignore . 5) (min-height-safe
. 1) (min-width-safe . 2) (min-pixel-height . 84) (min-pixel-width
. 90) (min-pixel-height-ignore . 45) (min-pixel-width-ignore
. 43) (min-pixel-height-safe . 21) (min-pixel-width-safe . 18))
leaf (pixel-width . 1918) (pixel-height . 1057) (total-width
. 213) (total-height . 50) (normal-height . 1.0) (normal-width
. 1.0) (parameters (burly-url . \"emacs+burly+bookmark://baal.el?filename=%22~%2F.config%2Femacs%2Fbaal.el%22&front-context-string=%22shell-quote-argu%22&rear-context-string=%22uery%20default%20%5C%22%20%28%22&position=208597&defaults=%28%22baal.el%22%29\")
(better-jumper-struct . " "s(better-jumper-jump-list-struct (0 42 . [(\"/home/morpheus/.config/emacs/baal.el\" 83227 \"i5j1it\")
(\"/home/morpheus/.config/emacs/baal.el\" 277747 \"mwq71b\") (\"/home/morpheus/.config/emacs/baal.el\" 287511 \"ei4coz\")
(\"/home/morpheus/.config/emacs/baal.el\" 300238 \"e12c67\") (\"/home/morpheus/.config/emacs/baal.el\" 300821 \"bk8lvj\")
(\"/home/morpheus/.config/emacs/baal.el\" 300984 \"j3fjmq\") (\"/home/morpheus/.config/emacs/baal.el\" 301320 \"39d39k\")
(\"/home/morpheus/.config/emacs/baal.el\" 301467 \"4g2i7p\") (\"/home/morpheus/.config/emacs/baal.el\" 301553 \"4s7jxb\")
(\"/home/morpheus/.config/emacs/baal.el\" 301831 \"2eb3lp\") (\"/home/morpheus/.config/emacs/baal.el\" 301862 \"z1ezgz\")
(\"/home/morpheus/.config/emacs/baal.el\" 301907 \"1cbhbx\") (\"/home/morpheus/.config/emacs/baal.el\" 301943 \"6ehh4q\")
(\"/home/morpheus/.config/emacs/baal.el\" 302175 \"80vt9k\") (\"/home/morpheus/.config/emacs/baal.el\" 302319 \"1py0uw\")
(\"/home/morpheus/.config/emacs/baal.el\" 302394 \"e04mit\") (\"/home/morpheus/.config/emacs/baal.el\" 270507 \"ocd3ng\")
(\"/home/morpheus/.config/emacs/baal.el\" 270433 \"l86jg3\") (\"/home/morpheus/.config/emacs/baal.el\" 270397 \"sdid2w\")
(\"/home/morpheus/.config/emacs/baal.el\" 270359 \"gukbg4\") (\"/home/morpheus/.config/emacs/baal.el\" 270319 \"4rhvug\")
(\"/home/morpheus/.config/emacs/baal.el\" 270211 \"43mq7b\") (\"/home/morpheus/.config/emacs/baal.el\" 270178 \"9gkhi0\")
(\"/home/morpheus/.config/emacs/baal.el\" 270142 \"wvr0pq\") (\"/home/morpheus/.config/emacs/baal.el\" 270106 \"n3ome9\")
(\"/home/morpheus/.config/emacs/baal.el\" 269790 \"pupeua\") (\"/home/morpheus/.config/emacs/baal.el\" 269764 \"7tfbk5\")
(\"/home/morpheus/.config/emacs/baal.el\" 269743 \"x8aoum\") (\"/home/morpheus/.config/emacs/baal.el\" 269713 \"7fh6oa\")
(\"/home/morpheus/.config/emacs/baal.el\" 269676 \"zb74cs\") (\"/home/morpheus/.config/emacs/baal.el\" 269641 \"kyuoqc\")
(\"/home/morpheus/.config/emacs/baal.el\" 269617 \"hx63yz\") (\"/home/morpheus/.config/emacs/baal.el\" 269576 \"poe89o\")
(\"/home/morpheus/.config/emacs/baal.el\" 269537 \"58tqjb\") (\"/home/morpheus/.config/emacs/baal.el\" 269504 \"16kq5d\")
(\"/home/morpheus/.config/emacs/baal.el\" 269432 \"8mvals\") (\"/home/morpheus/.config/emacs/baal.el\" 5206 \"zkqbu0\")
(\"/home/morpheus/.config/emacs/baal.el\" 6367 \"lsh8zp\") (\"/home/morpheus/.config/emacs/baal.el\" 6509 \"75bo18\")
(\"/home/morpheus/.config/emacs/baal.el\" 195741 \"6jufkt\") (\"/home/morpheus/.config/emacs/baal.el\" 196102 \"30ez9n\")
(\"/home/morpheus/.config/emacs/baal.el\" 208000 \"uv5hcj\") nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil]) -1))) (buffer \"baal.el\" (selected . t) (hscroll . 0) (fringes 8 8 nil nil)
(margins 1) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 208597) (start . 206873))
(prev-buffers (\"burly.el\" 11083 12930) (\"*scratch*\" 82 875) (\"*Scratch for emacs-lisp-mode*\" 1 386)))" nil nil nil t t)

Finally, this results in url-path-and-query (in both burly--frameset-restore & burly--window-set) to produce the following, which does not seem to include the entirety of the burly url.

"?(((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 5) (min-height-safe . 1) (min-width-safe . 2)
(min-pixel-height . 84) (min-pixel-width . 90) (min-pixel-height-ignore . 45) (min-pixel-width-ignore . 43) (min-pixel-height-safe . 21)
(min-pixel-width-safe . 18)) leaf (pixel-width . 1918) (pixel-height . 1057) (total-width . 213) (total-height . 50) (normal-height . 1.0)
(normal-width . 1.0) (parameters (burly-url . \"emacs+burly+bookmark://baal.el?filename=%22~%2F.config%2Femacs%2Fbaal.el%22&front-context-string=%22shell-quote-argu%22&rear-context-string=%22uery%20default%20%5C%22%20%28%22&position=208597&defaults=%28%22baal.el%22%29\")
(better-jumper-struct . "

I didnt know if this should be brought up to you or the better-jumper maintainer, but it does not seem to affect desktop.el or vanilla bookmarks so I figured you would like to know.

I'm currently using the latest commit in burly and Emacs version 28.0.50 built 2020-10-22

alphapapa commented 3 years ago

Hi,

Thanks for reporting this. It's a bug in Burly, not better-jumper. I think this commit I just pushed should fix it. Please let me know how it works for you. You'll need to recreate that bookmark first.

tpeacock19 commented 3 years ago

Thanks for getting to this quickly! It works as expected with the fix.

alphapapa commented 3 years ago

Great, thanks.