From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Newsgroups: gmane.emacs.bugs 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 Message-ID: <87364zd67b.8.fsf@jidanni.org> References: <877dy1ba5z.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <87tv15etv2.8.fsf@jidanni.org> <87k1219dy2.8.fsf@jidanni.org> <87ft919vsc.fsf@gnus.org> <877duc9w58.5.fsf@jidanni.org> <83o8nn99jz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30014"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 40888@debbugs.gnu.org, stefan@marxist.se, tomasn@posteo.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 06 19:40:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3jsC-0007ds-45 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Aug 2020 19:40:12 +0200 Original-Received: from localhost ([::1]:37586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3jsA-0007NR-Lb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Aug 2020 13:40:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3js3-0007N0-2Q for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 13:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3js2-0003LL-P5 for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 13:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k3js2-0002xu-GI for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 13:40:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87tv15etv2.8.fsf@jidanni.org> Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Aug 2020 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40888 X-GNU-PR-Package: emacs Original-Received: via spool by 40888-submit@debbugs.gnu.org id=B40888.159673559011364 (code B ref 40888); Thu, 06 Aug 2020 17:40:02 +0000 Original-Received: (at 40888) by debbugs.gnu.org; 6 Aug 2020 17:39:50 +0000 Original-Received: from localhost ([127.0.0.1]:54876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3jrq-0002xD-3d for submit@debbugs.gnu.org; Thu, 06 Aug 2020 13:39:50 -0400 Original-Received: from lavender.maple.relay.mailchannels.net ([23.83.214.99]:28541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3jrm-0002x2-Gz for 40888@debbugs.gnu.org; Thu, 06 Aug 2020 13:39:49 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E5D5A92111A; Thu, 6 Aug 2020 17:39:44 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a78.g.dreamhost.com (100-96-12-26.trex.outbound.svc.cluster.local [100.96.12.26]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3BF2F921BB5; Thu, 6 Aug 2020 17:39:44 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from pdx1-sub0-mail-a78.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.8); Thu, 06 Aug 2020 17:39:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Cooperative-Harmony: 7883a8281aa6754e_1596735584760_2835057793 X-MC-Loop-Signature: 1596735584759:4188603207 X-MC-Ingress-Time: 1596735584759 Original-Received: from pdx1-sub0-mail-a78.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTP id EAB557F0DE; Thu, 6 Aug 2020 10:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type :content-transfer-encoding; s=jidanni.org; bh=gMsiBU3fJ62xzU0Nnx /aRxLOFHs=; b=EQOCYdD4M8ggbFn/w2QJ/sJR++xemmrTkxyDsxOqGN2GW8KJxA hAqcJh/qxrVZ6ZhQjjvzVe6R2F0bKFiXe/svMYpkyly+SEDpFy6YmAHVjv9mBmYq qH1z44DmB80HV2tnM7q+GniIEtNaOaCawIW+YPDoeVQAJ0fQ5GVpdGKPg= Original-Received: from jidanni.org (114-41-2-135.dynamic-ip.hinet.net [114.41.2.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTPSA id 5F6B57F0D4; Thu, 6 Aug 2020 10:39:41 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a78 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrkedtgdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhffffkgggtgfesthekredttddtjeenucfhrhhomhepnjjnnjcuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqnecuggftrfgrthhtvghrnhepudduveevteeutdeiieejtdekfefgteeiffevueejfefgudevieeluefhueduveevnecukfhppeduudegrdeguddrvddrudefheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehjihgurghnnhhirdhorhhgpdhinhgvthepuddugedrgedurddvrddufeehpdhrvghtuhhrnhdqphgrthhhpeeprehuthhfqdekreeureehiehmpfehnfhiheehsgevkeerpecuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqpdhmrghilhhfrhhomhepjhhiuggrnhhnihes jhhiuggrnhhnihdrohhrghdpnhhrtghpthhtohepshhtvghfrghnsehmrghrgihishhtrdhsvg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184203 Archived-At: >>>>> "EZ" =3D=3D Eli Zaretskii writes: >> From: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson >> >> Date: Thu, 06 Aug 2020 13:32:51 +0800 >> Cc: Tomas Nordin , 40888@debbugs.gnu.org, >> Stefan Kangas >>=20 >> Well, just like we don't purchase a house for our client before we che= ck >> 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 m= uch. 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', t= o 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.