unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 40888@debbugs.gnu.org, stefan@marxist.se,
	tomasn@posteo.net
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	[thread overview]
Message-ID: <87364zd67b.8.fsf@jidanni.org> (raw)
In-Reply-To: <87tv15etv2.8.fsf@jidanni.org>

>>>>> "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	other threads:[~2020-08-06 17:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 22:59 bug#40888: M-x man: don't redraw good pages when not finding bad pages 積丹尼 Dan Jacobson
2020-04-27  8:33 ` Tomas Nordin
2020-04-27 14:54   ` 積丹尼 Dan Jacobson
2020-04-27 15:07     ` Stefan Kangas
2020-04-27 20:25       ` Tomas Nordin
2020-08-05 11:28       ` Lars Ingebrigtsen
2020-08-06  5:32         ` 積丹尼 Dan Jacobson
2020-08-06  7:17           ` Lars Ingebrigtsen
2020-08-06 13:40           ` Eli Zaretskii
2020-08-06 17:39             ` 積丹尼 Dan Jacobson [this message]
2020-08-06 17:41               ` Lars Ingebrigtsen
2022-02-20 14:17                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87364zd67b.8.fsf@jidanni.org \
    --to=jidanni@jidanni.org \
    --cc=40888@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=stefan@marxist.se \
    --cc=tomasn@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).