pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Ed Avis <eda@waniasset.com>
Cc: Francisco Olarte <folarte@peoplecall.com>
Cc: Bruce Momjian <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: Wed, 10 Dec 2014 15:45:48 -0300
Message-ID: <20141210184548.GY1768@alvh.no-ip.org> (raw)
In-Reply-To: <7E039918541B4C4183BFDB8F015C74302E4DF381@WCL-EXCH02.wcl.local>
References: <20141117093434.2479.18410@wrigleys.postgresql.org>
	<20141203004050.GA25084@momjian.us>
	<26947.1417573493@sss.pgh.pa.us>
	<loom.20141208T123007-701@post.gmane.org>
	<20141209202406.GC24487@momjian.us>
	<7E039918541B4C4183BFDB8F015C74302E4DC4CA@WCL-EXCH02.wcl.local>
	<CA+bJJbyLGopy=+EzM2j5UxBQqVbX7ynxf=ZdcpCuzr1Fw0kfmQ@mail.gmail.com>
	<7E039918541B4C4183BFDB8F015C74302E4DF381@WCL-EXCH02.wcl.local>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Ed Avis wrote:
> psql decides whether to run a pager depending on whether its output is a tty.
> That is the 'guessing' I referred to.
> 
> If starting from scratch I would probably prefer pager=off to be the default, but that
> is a larger change and would certainly inconvenience those who currently use psql in xterm, etc.

This "guessing" is well established.  Git uses a pager automatically
when its output is a tty, for example, and doesn't use one when it's
being piped or redirected.  Telling git users that they must turn the
pager off before redirecting would put off a lot of people, regardless
of the "but you configured it so!" argument.

I don't like software that does magic things when they don't make sense,
but I do like software that does magic things when they are demonstrably
useful -- particularly if I can turn them off in the very rare corner
cases where I need to do that.

I'm not an Emacs user, but years ago if I invoked "man" from inside Vim
the pager was invoked and it had the stupid property of telling me that
my terminal was dysfunctional (what!? it's a freaking xterm, FFS) and
displaying useless, horrid prompts that I couldn't get rid of.  I truly
appreciate that now the pager, for some reason, now works correctly
inside a Vim window.  Not sure who fixed it but they have my sincerest
appreciation.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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)

Message-ID: <20141210184548.GY1768@alvh.no-ip.org>
Permalink:  ../20141210184548.GY1768@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20141210184548.GY1768@alvh.no-ip.org

 · 

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: alvherre@2ndquadrant.com, eda@waniasset.com, folarte@peoplecall.com, bruce@momjian.us
  Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
  In-Reply-To: <20141210184548.GY1768@alvh.no-ip.org>
  References: <20141117093434.2479.18410@wrigleys.postgresql.org> <20141203004050.GA25084@momjian.us> <26947.1417573493@sss.pgh.pa.us> <loom.20141208T123007-701@post.gmane.org> <20141209202406.GC24487@momjian.us> <7E039918541B4C4183BFDB8F015C74302E4DC4CA@WCL-EXCH02.wcl.local> <CA+bJJbyLGopy=+EzM2j5UxBQqVbX7ynxf=ZdcpCuzr1Fw0kfmQ@mail.gmail.com> <7E039918541B4C4183BFDB8F015C74302E4DF381@WCL-EXCH02.wcl.local> <20141210184548.GY1768@alvh.no-ip.org>

* 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