all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: page-at-a-time output for M-x shell
Date: Tue, 14 Jul 2009 19:39:04 +0200	[thread overview]
Message-ID: <87r5wjf9l3.fsf@galatea.local> (raw)
In-Reply-To: 19dfd9e3-c7ad-4680-bfb7-2d25f79fca91@o36g2000vbl.googlegroups.com

Francis Moreau <francis.moro@gmail.com> writes:

> On 14 juil, 05:12, Barry Margolin <bar...@alum.mit.edu> wrote:
>> In article
>> <0eab476b-cd5f-444d-b2af-d82ac076e...@r34g2000vba.googlegroups.com>,
>>  Francis Moreau <francis.m...@gmail.com> wrote:
>>
>>
>>
>> > On Jul 13, 11:04 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> > > Am 13.07.2009 um 10:03 schrieb Francis Moreau:
>>
>> > > > I never claim to have a splendid idea. I just found weird that this is
>> > > > not offered by M-x shell, whereas it is by M-x term...
>>
>> > > The one offers an environment to run a shell interpreter  
>> > > interactively in it,
>>
>> > OK, so what am I supposed to run in this shell interpreter ?
>>
>> > I can understand that I can't start mutt or any other appli that needs
>> > all term environment in M-x shell, but the feature I'm asking is not
>> > specific to term emulation, it's just a goodies to make life easier
>> > when reading the _text_ output of any commands I start from this shell
>> > interpreter.
>>
>> Why do you need a pager, when the Emacs shell buffer allows you to page
>> back and forward through the output, search it, etc.?
>
> Ok, let me ask you one question: why do anybody use ('| less') in all
> term emulation whereas they all have the PgUp/PgDw functionality ?
>
> because it's obviously not convenient.

You are wrong, and mixing concepts.

1- Not all terminal emulator have an history that you can navigate
   (with suposedly PgUp and PgDn).  The job of a terminal emulator is
   to send bytes to the application for any key pressed including PgUp
   and PgDn, so normally they wouldn't preempt them to scroll the
   history, if they have one.

2- In the case of M-x shell, nobody use |less, since we can scroll
   back painlessly.


Actually, the invention of more or less comes directly from this
characteristic feature of a glass terminal, that it shows only a
limited number of lines, and you cannot scroll back.

When we still worked with teletypes, there was no need for more or
less, since you could always check what was printed in the roll of
paper (and it would have been totally ludicrous to print again a page
that had been already printed).

Then glass tty were introduced, that behaved like teletypes, but they
showed only 24 or 25 lines.  This was a big backset, but it presented
some advantages: we didn't need to use so many trees anymore, and we
could now directly address and update any characters in the window.
Anyway with these glass tty, since anything beyond the 24th/25th line
was lost, a workaround was needed, and more or less (the pager
concept) was invented.  Notice that 25*80 = 2000 bytes which is about
the size of central memory that was allocated to each user on the
computers used at that time, so it would have been impossible to keep
the whole output in a RAM buffer too (data was dumped in temporary
spool files).


But then bitmap screens and X servers and emacs were invented, on
machines with more memory than you could fill with your trolls, so the
previous workaround could be lost, and we can now implement the normal
feature, dump the whole output in the in RAM buffer, and let the user
see whatever part he wants with normal buffer navigation commands.



> It's not convenient because a) you get the wanted result without any
> user interventions (search, key press...) 

So you're saying that user intervention is "convenient"?  Computer are
made to aleviate human work, not to give more work to human slaves.


> b) the command which outputs the data is stopped as soon as the
> reader stops to read the produced data.

You'll have to explain in what aspect it is convenient to stop a
process, and leave resources busy for an indeterminate amount of time,
instead of releasing them for the other processes to use.


> Note: just to be sure I'm understood, I'm not asking for a pager in
> shell mode.

How strange, it seemed to everybody that was exactly what you were
asking in your second post:

    I'd want to use a pager with 'M-x shell' but ' | $PAGER' doesn't work
    nicely in emacs shell. So if I loose the '| $PAGER' part, I loose the
    functionnality I want to have as well...

and we've spend an inordinate amount of time explaining that you
didn't loose the functionality, since shell implements it inherently,
in addition to the epager script I provided if you didn't want to
loose the '| $PAGER' part.


You should consider yourself satisfied and quit it.

-- 
__Pascal Bourguignon__


  reply	other threads:[~2009-07-14 17:39 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11 13:14 page-at-a-time output for M-x shell Francis Moreau
2009-07-11 13:56 ` Pascal J. Bourguignon
2009-07-11 15:04   ` Peter Dyballa
2009-07-11 17:29     ` Sumit Narayan
     [not found]   ` <mailman.2292.1247324671.2239.help-gnu-emacs@gnu.org>
2009-07-11 18:06     ` Pascal J. Bourguignon
2009-07-12 12:24   ` Francis Moreau
2009-07-12 17:02     ` Pascal J. Bourguignon
2009-07-11 14:19 ` Peter Dyballa
     [not found] ` <mailman.2288.1247322297.2239.help-gnu-emacs@gnu.org>
2009-07-12 12:20   ` Francis Moreau
2009-07-12 13:45     ` Peter Dyballa
     [not found]     ` <mailman.2349.1247406371.2239.help-gnu-emacs@gnu.org>
2009-07-12 14:12       ` Richard Riley
2009-07-12 17:47         ` Francis Moreau
2009-07-12 17:40       ` Francis Moreau
2009-07-12 17:54         ` Teemu Likonen
2009-07-13  8:07           ` Francis Moreau
2009-07-13  8:21             ` Teemu Likonen
2009-07-13  9:16               ` Francis Moreau
2009-07-13  9:51                 ` Teemu Likonen
2009-07-13 11:27                   ` Francis Moreau
2009-07-13 13:12                     ` Sébastien Vauban
2009-07-13 14:48                       ` Anselm Helbig
2009-07-13 15:07                         ` Teemu Likonen
2009-07-14 15:07                       ` Francis Moreau
2009-07-14 17:16                         ` Pascal J. Bourguignon
2009-07-14 20:02                           ` Francis Moreau
2009-07-14 22:42                             ` Peter Dyballa
2009-07-12 19:41         ` Peter Dyballa
2009-07-13  5:17           ` tomas
2009-07-13  8:10             ` Peter Dyballa
     [not found]         ` <mailman.2380.1247427719.2239.help-gnu-emacs@gnu.org>
2009-07-13  8:03           ` Francis Moreau
2009-07-13  9:04             ` Peter Dyballa
     [not found]             ` <mailman.2414.1247475890.2239.help-gnu-emacs@gnu.org>
2009-07-13  9:38               ` Francis Moreau
2009-07-13 10:43                 ` Peter Dyballa
     [not found]                 ` <mailman.2418.1247481796.2239.help-gnu-emacs@gnu.org>
2009-07-13 11:29                   ` Francis Moreau
2009-07-13 20:42                     ` Samuel Wales
     [not found]                     ` <mailman.2451.1247517772.2239.help-gnu-emacs@gnu.org>
2009-07-13 22:05                       ` Teemu Likonen
     [not found]                       ` <mailman.2453.1247522780.2239.help-gnu-emacs@gnu.org>
2009-07-14 10:55                         ` Pascal J. Bourguignon
2009-07-14 15:10                           ` Francis Moreau
2009-07-14 17:21                             ` Pascal J. Bourguignon
2009-07-14 19:21                               ` tomas
     [not found]                               ` <mailman.2508.1247599009.2239.help-gnu-emacs@gnu.org>
2009-07-14 19:52                                 ` Francis Moreau
2009-07-14 20:39                                   ` Pascal J. Bourguignon
2009-07-14 20:00                         ` Francis Moreau
2009-07-14  3:12                 ` Barry Margolin
2009-07-14  9:21                   ` Miles Bader
2009-07-14 15:20                   ` Francis Moreau
2009-07-14 17:39                     ` Pascal J. Bourguignon [this message]
2009-07-14 21:05                     ` Barry Margolin
2009-07-13  9:53               ` Richard Riley
2009-07-12 12:40 ` Teemu Likonen
2009-07-12 13:26   ` Richard Riley
2009-07-12 14:52     ` Thierry Volpiatto
2009-07-13 21:43 ` Pascal J. Bourguignon

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5wjf9l3.fsf@galatea.local \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.