Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XySSM-0002vG-2K for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 21:36:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XySSL-0000R8-JL for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 21:36:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XySSK-0000R2-UW for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 21:36:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XySSC-0000Db-Oa for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 21:36:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sB9LaDVm024748; Tue, 9 Dec 2014 16:36:13 -0500 From: Tom Lane To: Christopher Browne cc: Bruce Momjian , Ed Avis , PostgreSQL Mailing Lists Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal) In-reply-to: References: <20141117093434.2479.18410@wrigleys.postgresql.org> <20141203004050.GA25084@momjian.us> <26947.1417573493@sss.pgh.pa.us> <20141209202406.GC24487@momjian.us> <20141209205612.GE24487@momjian.us> Comments: In-reply-to Christopher Browne message dated "Tue, 09 Dec 2014 16:14:07 -0500" Date: Tue, 09 Dec 2014 16:36:13 -0500 Message-ID: <24746.1418160973@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Christopher Browne writes: > On 9 December 2014 at 15:56, Bruce Momjian 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs