Skip to content

Set PAGER in Emacs 31 #43

@real-or-random

Description

@real-or-random

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions