[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] TeX-run-silent discards all outputs from process
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX-devel] TeX-run-silent discards all outputs from process |
Date: |
Fri, 19 May 2017 12:33:17 +0200 |
Hi!
2017-05-19 7:43 GMT+02:00 Ikumi Keita <address@hidden>:
> 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))
> (erase-buffer)
> (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.)
I think your proposal makes sense, but I'm wondering whether it's
better to completely remove a function not used in AUCTeX that doesn't
even do correctly what it should. Ok, this can be done later (AUCTeX
12?), so please go ahead with your fix.
Bye,
Mosè