Subject: bug#28905: 11.90.2.2017-07-25; TeX-documentation-texdoc blocks

From: Ikumi Keita <[email-masked]>
Date: Mon, 05 Nov 2018 03:33:38 +0900

Hi Mosè,

>>>>> Mosè Giordano <[email-masked]> writes:

> I didn't try the patch, just read it.  The idea should be to launch an
> asynchronous process and show its output, correct?

Yes.

> Only one comment: is it necessary to use
> `start-process-shell-command'?  Wouldn't `start-process' be
> sufficient?

Yes, mostly.  The two would make little difference.  I followed the
previous code which used `shell-command-to-string'.  (Actually, other
parts of this function pay attention whether to use underlying shell or
not, as the comments between the code tell:
		  ;; Note: `shell-command-to-string' uses shell, only
		  ;; `call-process' looks at `exec-path', thus only here makes
		  ;; sense to use `executable-find' to test whether texdoc is
		  ;; available.
and
	;; Called without prefix argument: just run "texdoc --view <pkg>" and
	;; show the output, so that the user is warned in case it doesn't find
	;; the documentation or "texdoc" is not available.
)

As far as I can see, the difference between `start-process' and
`start-process-shell-command' would be noticeable only when:
(1) texdoc is not available on the user's machine.  In that case,
`start-process' would end in lisp error while
`start-process-shell-command' would continue to run and show the error
message "texdoc: No such file or directory" which the shell outputs.
(2) the values of `exec-path' and PATH of the invoked shell differ.  If
one of them contains texdoc and other doesn't, calling texdoc might
success or not, accordingly.

Best,
Ikumi Keita