Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Date
Msg-id 24746.1418160973@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)  (Christopher Browne <cbbrowne@gmail.com>)
Responses Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Christopher Browne
Date:
Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Next
From: cowwoc
Date:
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created