From ad617198bf31238533b93e955ca9adb650ddc932 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 2 Sep 2012 03:26:28 +0200 Subject: Image support: buttons and auto-display in the REPL When geiser-repl-inline-images-p is false (or we're in a terminal), the inserted text replacement is a button that calls the external viewer on click. There's also a parameter controlling whether the viewer should be invoked automatically upon insertion. --- elisp/geiser-repl.el | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'elisp/geiser-repl.el') diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 7eb7cf0..ddcc6b8 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -46,8 +46,10 @@ REPL buffer." :type 'boolean :group 'geiser-repl) -(geiser-custom--defcustom geiser-repl-history-filename (expand-file-name "~/.geiser_history") +(geiser-custom--defcustom geiser-repl-history-filename + (expand-file-name "~/.geiser_history") "File where REPL input history is saved, so that it persists between sessions. + This is actually the base name: the concrete Scheme implementation name gets appended to it." :type 'filename @@ -114,10 +116,16 @@ If you have a slow system, try to increase this time." :type 'integer :group 'geiser-repl) -(geiser-custom--defcustom geiser-repl-inline-images t - "Whether to display inline images in the REPL." - :type 'boolean - :group 'geiser-repl) +(geiser-custom--defcustom geiser-repl-inline-images-p t + "Whether to display inline images in the REPL." + :type 'boolean + :group 'geiser-repl) + +(geiser-custom--defcustom geiser-repl-auto-display-images-p t + "Whether to automatically invoke the external viewer to display +images pooping up in the REPL." + :type 'boolean + :group 'geiser-repl) (geiser-custom--defface repl-input 'comint-highlight-input geiser-repl "evaluated input highlighting") @@ -274,7 +282,8 @@ module command as a string") (defun geiser-repl--output-filter (txt) (geiser-con--connection-update-debugging geiser-repl--connection txt) - (geiser-image--replace-images geiser-repl-inline-images) + (geiser-image--replace-images geiser-repl-inline-images-p + geiser-repl-auto-display-images-p) (when (string-match-p (geiser-con--connection-prompt geiser-repl--connection) txt) (geiser-autodoc--disinhibit-autodoc))) -- cgit v1.2.3