bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: 積丹尼 Dan Jacobson
Subject: bug#40888: M-x man: don't redraw good pages when not finding bad pages
Date: Fri, 07 Aug 2020 01:39:36 +0800

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>> From: 積丹尼 Dan Jacobson
>> <jidanni@jidanni.org>
>> Date: Thu, 06 Aug 2020 13:32:51 +0800
>> Cc: Tomas Nordin <tomasn@posteo.net>, 40888@debbugs.gnu.org,
>> Stefan Kangas <stefan@marxist.se>
>> 
>> 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.

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

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

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

OK, instead of
1. Make a buffer
2. Get the stuff to put into it.
3. Put that stuff into it.

Do:
2. Get the stuff to put into it.
1. Make a buffer
3. Put that stuff into it.

That way if (2) fails, it can quit before (1) happens, instead of before
(3) happens.

Just like at theaters, one doesn't change the stage set for actor B, if
he isn't coming tonight, then have to change it back so actor A can keep
acting some more.





reply via email to

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