[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] TeX-run-silent discards all outputs from process

From: Ikumi Keita
Subject: [AUCTeX-devel] TeX-run-silent discards all outputs from process
Date: Fri, 19 May 2017 14:43:20 +0900

Hi all,

I found a strange code in `TeX-run-silent' of tex-buf.el.

(defun TeX-run-silent (name command _file)
  "Start process with second argument."
  (let ((dir (TeX-master-directory)))
    (set-buffer (get-buffer-create "*TeX silent*"))
    (if dir (cd dir))
    (let ((process (start-process (concat name " silent")
                                  nil TeX-shell
                                  TeX-shell-command-option command)))
      (if TeX-after-start-process-function
          (funcall TeX-after-start-process-function process))
      (process-kill-without-query process))))

Since the second argument of the `start-process' is nil, the process is
not associated with any buffer.  In addition, the function does not
assign any filter to the process unlike `TeX-run-background', so the
outputs from the process is totally discarded while the process runs in
background.  Thus the prepared buffer "*TeX silent*" is not used at all.

A function to discard all outputs from the process and let the process
to run in background exists separately as `TeX-run-discard'.  I suppose
that the intent of making `TeX-run-silent' is to collect the outputs
from the process into "*TeX silent*" buffer.

So I propose to change the second argument of `start-process' like this:
    (let ((process (start-process (concat name " silent")
                                  (current-buffer) TeX-shell
though it is not so useful without adding a key bind to show "*TeX
silent*" buffer to the user.

(It does not make siginificant difference anyway because
`TeX-run-silent' is not used at all in the current AUCTeX.)

Ikumi Keita

reply via email to

[Prev in Thread] Current Thread [Next in Thread]