From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#40888: M-x man: don't redraw good pages when not finding bad pages Date: Thu, 06 Aug 2020 16:40:48 +0300 Message-ID: <83o8nn99jz.fsf@gnu.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24454"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 40888@debbugs.gnu.org, stefan@marxist.se, tomasn@posteo.net To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 06 15:42:11 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 1k3g9q-0006G6-Tu for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Aug 2020 15:42:10 +0200 Original-Received: from localhost ([::1]:43610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3g9p-0000vG-U2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Aug 2020 09:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3g9j-0000v6-3s for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 09:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41915) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3g9i-0003OE-QS for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 09:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k3g9i-00076c-P3 for bug-gnu-emacs@gnu.org; Thu, 06 Aug 2020 09:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Aug 2020 13:42: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.159672126327223 (code B ref 40888); Thu, 06 Aug 2020 13:42:02 +0000 Original-Received: (at 40888) by debbugs.gnu.org; 6 Aug 2020 13:41:03 +0000 Original-Received: from localhost ([127.0.0.1]:53457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3g8l-000751-8J for submit@debbugs.gnu.org; Thu, 06 Aug 2020 09:41:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3g8j-00074R-Ot for 40888@debbugs.gnu.org; Thu, 06 Aug 2020 09:41:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51021) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3g8d-0003H8-U5; Thu, 06 Aug 2020 09:40:55 -0400 Original-Received: from [176.228.60.248] (port=2012 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k3g8d-0005av-El; Thu, 06 Aug 2020 09:40:55 -0400 In-Reply-To: <877duc9w58.5.fsf@jidanni.org> 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:184178 Archived-At: > From: 積丹尼 Dan Jacobson > > Date: Thu, 06 Aug 2020 13:32:51 +0800 > Cc: Tomas Nordin , 40888@debbugs.gnu.org, > Stefan Kangas > > 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?