diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-09-02 03:26:28 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-09-02 03:26:28 +0200 |
commit | ad617198bf31238533b93e955ca9adb650ddc932 (patch) | |
tree | 844f3bfbb704aa27237dedbfc51b4ad9ef27f0b4 /elisp/geiser-repl.el | |
parent | 1e61bc61bfb690747cc881d4938c0724b13db6ed (diff) | |
download | geiser-ad617198bf31238533b93e955ca9adb650ddc932.tar.gz geiser-ad617198bf31238533b93e955ca9adb650ddc932.tar.bz2 |
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.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 21 |
1 files changed, 15 insertions, 6 deletions
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))) |