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#62958: [PATCH] Set PAGER=cat in comint.el Date: Thu, 20 Apr 2023 09:43:00 +0300 Message-ID: <83edof6oln.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62958@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 20 08:43:32 2023 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 1ppO0x-000AVd-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Apr 2023 08:43:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppO0V-0002AM-IC; Thu, 20 Apr 2023 02:43:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppO0U-000299-88 for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 02:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppO0T-00047z-W4 for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 02:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ppO0T-00074p-MO for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 02:43:01 -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, 20 Apr 2023 06:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168197297927196 (code B ref 62958); Thu, 20 Apr 2023 06:43:01 +0000 Original-Received: (at 62958) by debbugs.gnu.org; 20 Apr 2023 06:42:59 +0000 Original-Received: from localhost ([127.0.0.1]:36345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppO0R-00074Z-GM for submit@debbugs.gnu.org; Thu, 20 Apr 2023 02:42:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppO0M-00074J-CP for 62958@debbugs.gnu.org; Thu, 20 Apr 2023 02:42:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppO0G-000427-JO; Thu, 20 Apr 2023 02:42:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HxrY+PtRhz9m2CTiHyP3/VYNz+yDGDeatD+1whZz9BQ=; b=hGGoIYxi77sI AB4brFF9o/sP5qTWkOcTt39+snzvLXngJRU2hun2J91k5SQMpm/IVis/8hru9QqpnzUKnRcANWVn2 fnpx8Rrk+xAcYRo/QQSlDJRw7qR/NXmG0zVGhj30QP2i+h1e/uFDVZJ7ajturc/FfdOVQ1IRdOZ2e ehNA/dYAaehgMa7q2UoqFas9obAwP747OVNnkieNWc8ZU2w43r18YHvEIyeaGfVPbol22ujCmosiK 39bNMEXgmIeqLMOOX/f/yEeDV9jU5c5eTL5wDJptZ6WzwhS5FC3WBUVYSQl75SPBgiCYjTMKuuj+6 eoK1LLQjX3od9gISKrb2xA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppO0F-0006Qm-4L; Thu, 20 Apr 2023 02:42:48 -0400 In-Reply-To: (message from Spencer Baugh on Wed, 19 Apr 2023 17:57:38 -0400) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260309 Archived-At: > From: Spencer Baugh > Date: Wed, 19 Apr 2023 17:57:38 -0400 > > Simply adding (setenv "PAGER" "cat") globally is not correct, since > that will break modes like term, which support paging quite well. > It's only and exactly the comint-derived modes which don't need > paging. > > Changing the default to "cat" in this way might be a bit > controversial... Sorry, this default cannot be universally correct. You assume that 'cat' is always available, which is not true on non-Posix platforms. So at the very least the value should be set according to executable-find. Having said that, I'm not really sure the default should be "cat" even if it is available, since AFAIK you are the only one who is unhappy with the current situation. So why not leave the default value as it is, i.e. nil? > +(defcustom comint-pager "cat" > + "If non-nil, the value to use for PAGER. This is too terse. It should at least say that the value should be a program name, a string. Bonus point for explaining what is PAGER, for those who don't necessarily know off-hand. > +gWhen this is nil, comint doesn't set PAGER at all." ^ Typo. Also, "set PAGER" is again too terse. > + :version "30.1" > + :type '(choice (const :tag "Don't set PAGER" nil) > + (const :tag "cat" "cat") The tag of "cat" is too terse again. It should at least include the word "program" somewhere. > @@ -864,6 +873,7 @@ comint-exec-1 > (nconc > (comint-term-environment) > (list (format "INSIDE_EMACS=%s,comint" emacs-version)) > + (when comint-pager (list (format "PAGER=%s" comint-pager))) Should this test that comint-pager is a string?