Emacs 31 will set PAGER=cat in the environment to make sure that non-interactive subprocesses started by Emacs don't use a pager. That's a bit unfortunate for terminal-here because it's an interactive subprocess by nature. Troubleshooting this has caused me some pain, so I assume others will run into this as well.
See emacs-mirror/emacs@7811a7d and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72426.
I'm not exactly sure what should be done about this. We can't restore the old value because there's no way to access it. I suggest that a variable is added to terminal-here, e.g., terminal-here-pager that, if non-nil, sets PAGER in the subprocess. The macro with-environment-variables could be used (introduced in emacs 28) to implement this easily. The variable should probably default to the empty string, or to less.
Emacs 31 will set
PAGER=catin the environment to make sure that non-interactive subprocesses started by Emacs don't use a pager. That's a bit unfortunate for terminal-here because it's an interactive subprocess by nature. Troubleshooting this has caused me some pain, so I assume others will run into this as well.See emacs-mirror/emacs@7811a7d and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72426.
I'm not exactly sure what should be done about this. We can't restore the old value because there's no way to access it. I suggest that a variable is added to terminal-here, e.g.,
terminal-here-pagerthat, if non-nil, setsPAGERin the subprocess. The macrowith-environment-variablescould be used (introduced in emacs 28) to implement this easily. The variable should probably default to the empty string, or toless.