Function: TeX-run-interactive

TeX-run-interactive is a byte-compiled function defined in tex.el.

Signature

(TeX-run-interactive NAME COMMAND FILE)

Documentation

Run TeX interactively.

Run command in a buffer (in comint-shell-mode) so that it accepts user interaction. If you return to the file buffer after the TeX run, Error parsing on C-x ` (next-error) should work with a bit of luck.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-run-interactive (name command file)
  "Run TeX interactively.
Run command in a buffer (in comint-shell-mode) so that it accepts user
interaction.  If you return to the file buffer after the TeX run,
Error parsing on \\[next-error] should work with a bit of luck."
  (TeX-run-set-command name command)
  (require 'comint)
  (let ((default TeX-command-default)
        (buffer (TeX-process-buffer-name file))
        (process nil)
        (dir (TeX-master-directory))
        (command-buff (current-buffer))
        (sentinel-function TeX-sentinel-default-function)) ; inherit from major mode
    (TeX-process-check file)            ; Check that no process is running
    (setq-default TeX-command-buffer command-buff)
    (with-output-to-temp-buffer buffer)
    (set-buffer buffer)
    (setq-local TeX-command-buffer command-buff)
    (setq buffer-read-only nil)
    (if dir (cd dir))
    (insert "Running `" name "' on `" file "' with ``" command "''\n")
    (comint-exec buffer name TeX-shell nil
                 (list TeX-shell-command-option command))
    (comint-mode)
    (add-hook 'comint-output-filter-functions #'TeX-interactive-goto-prompt)
    (setq mode-name name)
    (setq TeX-command-default default)
    (setq process (get-buffer-process buffer))
    (if TeX-after-start-process-function
        (funcall TeX-after-start-process-function process))
    (TeX-command-mode-line process)
    (set-process-sentinel process #'TeX-command-sentinel)
    (set-marker (process-mark process) (point-max))
    (require 'compile)
    (setq compilation-in-progress (cons process compilation-in-progress))
    (TeX-parse-reset)
    (setq TeX-parse-function #'TeX-parse-TeX)
    ;; use the sentinel-function that the major mode sets, not the LaTeX one
    (setq TeX-sentinel-function sentinel-function)))