Subject: Re: bug#49283: [PATCH] 27.2; `(call-process "program" null-device ...)' fails over TRAMP from local MS Windows

From: Michael Albinus <[email-masked]>
Date: Wed, 30 Jun 2021 09:24:47 +0200

Jim Porter <[email-masked]> writes:

Hi Jim,

> I noticed an issue when trying to use flyspell (or ispell) using
> hunspell from a local MS Windows system on a TRAMP file. It results in
> an error that it can't find the file "/sshx:server:/path/to/NUL". I
> narrowed this down to the fact that
> `ispell-find-hunspell-dictionaries' calls `call-process' with `infile'
> set to `null-device'.

`call-process' doesn't know of remote files. You must use `process-file' instead.

> To see this in action:
>
>   emacs -Q
>   C-x C-f /sshx:server:~/path/to/file.txt
>   M-: (setq ispell-program-name "hunspell") RET
>   M-x flyspell-mode
>   ;; or...
>   M-: (call-process "something" null-device) RET

It is not a good idea to use `null-device' as INFILE, just use nil. At
least in the `process-file' case, Tramp shall know which value to take
for `null-device'.

After all, it seems to be rather a flyspell/ispell feature request to
support remote files.

Best regards, Michael.