Skip to content

Instantly share code, notes, and snippets.

@ansxor
Last active January 11, 2025 22:47
Show Gist options
  • Save ansxor/4c949cfa2f65805ba7b10ae81db65f72 to your computer and use it in GitHub Desktop.
Save ansxor/4c949cfa2f65805ba7b10ae81db65f72 to your computer and use it in GitHub Desktop.
(use-package geiser-guile
:ensure t
:config
(setq answer/geiser-display-posframe--last-position nil)
(defun answer/geiser-display-posframe--get-last-position ()
(list (current-buffer) (buffer-modified-tick) (point)))
(defun answer/geiser-display-posframe--hide-handler (_info)
(not (equal (answer/geiser-display-posframe--get-last-position)
answer/geiser-display-posframe--last-position)))
(defun answer/geiser-display-posframe (what ret &optional res _auto-p)
(when (and res (posframe-workable-p))
(setq answer/geiser-display-posframe--last-position (answer/geiser-display-posframe--get-last-position))
(posframe-show "*geiser-debug-posframe-buffer*"
:string res
:position (point)
:border-width 1
:border-color "#d7d7d7"
:hidehandler #'answer/geiser-display-posframe--hide-handler)))
(advice-add 'geiser-debug--display-retort :before 'answer/geiser-display-posframe))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment