From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: page-at-a-time output for M-x shell Date: Tue, 14 Jul 2009 19:39:04 +0200 Organization: Informatimago Message-ID: <87r5wjf9l3.fsf@galatea.local> References: <30a09a22-cd05-44b6-9b82-8a7e6c1796d5@x3g2000yqa.googlegroups.com> <7bf1883b-3184-487c-a5a4-675f3e117342@l2g2000vba.googlegroups.com> <85269090-af0d-43fa-bd49-da265cbac558@p23g2000vbl.googlegroups.com> <3c2b0d8c-2d31-45f0-8eda-1af2320d8cf5@j9g2000vbp.googlegroups.com> <0eab476b-cd5f-444d-b2af-d82ac076e73b@r34g2000vba.googlegroups.com> <19dfd9e3-c7ad-4680-bfb7-2d25f79fca91@o36g2000vbl.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1247593355 26552 80.91.229.12 (14 Jul 2009 17:42:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2009 17:42:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 14 19:42:28 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQm1K-00082Z-Ib for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jul 2009 19:42:27 +0200 Original-Received: from localhost ([127.0.0.1]:38643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQm1J-0004U4-UR for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jul 2009 13:42:25 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 111 Original-X-Trace: individual.net kLzv3f8ToluLgQjyeUcKbw4MfJ5ZTYEeVFDi9enbKUvYo263Rx Cancel-Lock: sha1:OWZiZTcxMjYxNTk0ODZiNTgyMDFlOWNhY2Y3YTkyYmNjZWNmMmRlMQ== sha1:Mj5R5mDsmtp2gNZbvTFeqi3xWVA= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) Original-Xref: news.stanford.edu gnu.emacs.help:170873 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66070 Archived-At: Francis Moreau writes: > On 14 juil, 05:12, Barry Margolin wrote: >> In article >> <0eab476b-cd5f-444d-b2af-d82ac076e...@r34g2000vba.googlegroups.com>, >>  Francis Moreau wrote: >> >> >> >> > On Jul 13, 11:04 am, Peter Dyballa 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__