Function: executable-interpret

executable-interpret is an autoloaded, interactive and byte-compiled function defined in executable.el.gz.

Signature

(executable-interpret COMMAND)

Documentation

Run script with user-specified args, and collect output in a buffer.

While script runs asynchronously, you can use the C-x ` (next-error) command to find the next error. The buffer is also in comint-mode and compilation-shell-minor-mode(var)/compilation-shell-minor-mode(fun), so that you can answer any prompts.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/executable.el.gz
(defvar compilation-error-regexp-alist) ; from compile.el

;;;###autoload
(defun executable-interpret (command)
  "Run script with user-specified args, and collect output in a buffer.
While script runs asynchronously, you can use the \\[next-error]
command to find the next error.  The buffer is also in `comint-mode' and
`compilation-shell-minor-mode', so that you can answer any prompts."
  (interactive (list (read-string "Run script: "
				  (or executable-command
				      buffer-file-name))))
  (require 'compile)
  (save-some-buffers (not compilation-ask-about-save))
  (setq-local executable-command command)
  (let ((compilation-error-regexp-alist executable-error-regexp-alist))
    (compilation-start command t (lambda (_x) "*interpretation*"))))