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

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Ed Avis <eda(at)waniasset(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Date: 2014-12-09 12:19:54
Message-ID: CA+bJJbx6nY191w6=8YKtAd2bV2EcWxrdAr8LrYNqeW_W=WTMXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Dec 8, 2014 at 12:39 PM, Ed Avis <eda(at)waniasset(dot)com> wrote:

> .....

I appreciate the concern that this could open a Pandora's box of special
> case checks for all sorts of terminal types, but this is only the psql
> interactive shell we are talking about here, not the core database code.
> And all that is being controlled is the relatively minor choice of whether
> to run a pager program, not anything that affects database operations.
> psql already contains lots of features which exist to make interactive use
> more comfortable even at the expense of some complexity.
>

I've been making some tests with emacs shell mode, and it seems less does
not work ( expected ) and more works partially ( it seems in shell mode
emacs does whole lines only, so \040 does not work ). The ONLY problem I
see with psql is that the more/less usage as default pager seems to be
undocumented ( I mean, I have not bien able to find it without resorting to
the source code ). My problems with emacs seem to be caused by my actions,
that is, invoking a program which needs a minimally smart terminal inside a
really dumb one, and are easily solved by not doing it ( by the existing
mechanism of psetting pager to off, which I think is easy enough for
someone who uses psql inside emacs shell buffers, as he must be familiar to
the problems with any terminal controlling program ) . Psql source is hairy
enough cattering for windows/*ix stuff, and anyone can write a wrapper to
test for the INSIDE_EMACS and invoke psql with the appropiate pset option.

And the psql interactive shell is not a joke, it is a big chunk of the
reasons why I use postgres.

Just my opinion / vote.

Regards.
Francisco Olarte.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hubert depesz lubaczewski 2014-12-09 12:36:25 Re: regression, deadlock in high frequency single-row UPDATE
Previous Message Dmitri Koulikov 2014-12-09 11:08:39 Re: BUG #12137: ORDER BY with expresion changes the output if added