Skip to content

Instantly share code, notes, and snippets.

@tshatrov
Created April 25, 2020 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tshatrov/02e14ce32618f98705303812c2d427b2 to your computer and use it in GitHub Desktop.
Save tshatrov/02e14ce32618f98705303812c2d427b2 to your computer and use it in GitHub Desktop.
(defun view-file-slime (file &key (bufname "*image-viewer*"))
"Requires setting `slime-enable-evaluate-in-emacs' to T in Emacs"
(let ((ns (namestring file)))
(swank::eval-in-emacs `(slime-with-popup-buffer (,bufname :connection t :package t)
(insert-image (create-image ,ns))
(image-mode)
(setf buffer-file-name ,ns)
(not-modified)
(image-toggle-display-image)
))))
@tshatrov
Copy link
Author

screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment