pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ed Avis <eda@waniasset.com>
Cc: 'bruce@momjian.us' <bruce@momjian.us>
Cc: 'pgsql-bugs@postgresql.org' <pgsql-bugs@postgresql.org>
Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Date: Fri, 05 Dec 2014 13:57:19 -0500
Message-ID: <20090.1417805839@sss.pgh.pa.us> (raw)
In-Reply-To: <7E039918541B4C4183BFDB8F015C74302E43107B@WCL-EXCH02.wcl.local>
References: <7E039918541B4C4183BFDB8F015C74302E43107B@WCL-EXCH02.wcl.local>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 with TERM=dumb. Decades ago that would have meant a teleprinter terminal (or, perhaps, some ancient serial terminal or Minix 1.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (27+ messages)  latest in thread

Message-ID: <20090.1417805839@sss.pgh.pa.us>
Permalink:  ../20090.1417805839@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20090.1417805839@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, eda@waniasset.com, bruce@momjian.us
  Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
  In-Reply-To: <20090.1417805839@sss.pgh.pa.us>
  References: <7E039918541B4C4183BFDB8F015C74302E43107B@WCL-EXCH02.wcl.local> <20090.1417805839@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox