Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Browne <cbbrowne(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Ed Avis <eda(at)waniasset(dot)com>, PostgreSQL Mailing Lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Date: 2014-12-09 21:36:13
Message-ID: 24746.1418160973@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Christopher Browne <cbbrowne(at)gmail(dot)com> writes:
> On 9 December 2014 at 15:56, Bruce Momjian <bruce(at)momjian(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message cowwoc 2014-12-09 21:55:32 Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Previous Message Christopher Browne 2014-12-09 21:14:07 Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)