Subject: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command

From: Jim Porter <[email-masked]>
Date: Wed, 7 Aug 2024 09:08:12 -0700

On 8/7/2024 8:31 AM, Spencer Baugh wrote:
> Eli Zaretskii <[email-masked]> writes:
> 
>> As expected.  The problem is that a Lisp program could let-bind this
>> variable around a call to async-shell-command (or some other similar
>> API), in which case a setting in startup.el will not catch that.  But
>> maybe we don't care, since a program whose stdout is not a console
>> device will ignore PAGER anyway.
> 
> Yep - I think it's fine for the same reason it's fine to have TERM set
> by default, even though it's ignored by programs whose stdout is a pipe.

Git, at least, ignores PAGER entirely when stdout isn't a PTY. (I tested 
by setting PAGER to "rev" and trying with and without a PTY. I get 
reversed lines with a PTY, but everything is non-reversed without.)