Subject: bug#40888: M-x man: don't redraw good pages when not finding bad pages

From: Eli Zaretskii <[email-masked]>
Date: Thu, 06 Aug 2020 16:40:48 +0300

> From: 積丹尼 Dan Jacobson
>  <[email-masked]>
> Date: Thu, 06 Aug 2020 13:32:51 +0800
> Cc: Tomas Nordin <[email-masked]>, [email-masked],
>  Stefan Kangas <[email-masked]>
> 
> Well, just like we don't purchase a house for our client before we check
> if he has money in the bank, even if it means waiting for business
> hours, it seems the program should first make sure what it intends to
> display even exists. "test -f" certainly won't slow things down that much.

"test -f" won't do the job, because 'man' employs a non-trivial logic
to find the man page, using environment variables, command-line
options, and hardcoded directories and file names.  IOW, there's no
easy way of knowing what to put after "test -f".

Sounds like you are suggesting that Emacs either (a) reproduces all
that 'man' logic internally (not easily done, as different
implementations vary in how they do it), or (b)rely on 'man' itself
telling whether the file exists, which AFAIK must use command-line
options that aren't necessarily available in all versions of 'man', to
say nothing about slowing down the command due to duplicate
invocation.

All that to solve a minor annoyance?  Is that really justified?