Christopher Browne <cbbrowne@gmail.com> writes:
> On 9 December 2014 at 15:56, Bruce Momjian <bruce@momjian.us> wrote:
>> On Tue, Dec 9, 2014 at 03:53:52PM -0500, Christopher Browne wrote:
>>> I'd be really inclined to search INSIDE_EMACS for "comint", as well.
>> I don't understand. Is COMINT an environment variable name? I don't see
>> it in INSIDE_EMACS:
> In that case, you're running a shell in a buffer that is emulating a
> terminal (a not-dumb one), and I think you'll find that more, less, and
> most will work fine as pagers just as they would in an xterm.
The more I read about this, the more I think we should leave well enough
alone. As was pointed out upthread, users can fix this for not just psql
but many other programs by setting PAGER=cat.
Even if you aren't interested in fixing the behavior of any other
programs, I think it's likely that we're going to be tripping over corner
cases for years to come if we fool around with trying to interpret the
contents of INSIDE_EMACS. Said contents are not even documented in the
Emacs manual, let alone is there a list of which buffer modes it'd be
reasonable to suppress pager behavior for.
regards, tom lane