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 20090.1417805839@sss.pgh.pa.us
Whole thread Raw
In response to BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)  (eda@waniasset.com)
Responses Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
List pgsql-bugs
Ed Avis <eda@waniasset.com> writes:
>> Many shell scripts run from cron have a 'dumb' terminal value.

> And these scripts should output directly and not run a pager -- so matching what is being suggested for 'dumb'.

> In fact they already run without pager because their stdout is not a
> tty.

Right.  It only matters when we think stdout is a tty.

> What is being discussed here is what psql should do when it is writing to a tty, so interactive in some sense, but
withTERM=dumb. Decades ago that would have meant a teleprinter terminal (or, perhaps, some ancient serial terminal or
Minix1.0). Nowadays it means running inside emacs or some other management program, so there is no need to run a pager. 

I am pretty hesitant about extending the emacs example to apply to *every*
context where TERM=dumb, especially given the complete lack of field
complaints in this area.  I'm good with putting in a special hack for when
we're sure we're inside emacs, but I don't think an adequate case has been
made for assuming TERM=dumb means the opposite of what it appears to mean
on its face.  Especially not if there won't be a way for the user to
override the choice.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "'bruce@momjian.us'"
Date:
Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Next
From: Ed Avis
Date:
Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)