Clearing the buffer in eshell

Clearing the buffer in eshell

Post by Brian O. Bu » Thu, 30 Aug 2001 16:14:50



Hey all.

eshell Question: I have been trying to find some way to clear the
buffer (after while it gets large and out of control) without killing
it. I tried to go up and mark the entire buffer and cut it (as I did
with a regular bash shell) however, it says "Attempt modify read-only
text." Toggling read-only does nothing. Any ideas?

Thanks,
Brian

 
 
 

Clearing the buffer in eshell

Post by Kai Gro?joha » Thu, 30 Aug 2001 18:46:13



Quote:> eshell Question: I have been trying to find some way to clear the
> buffer (after while it gets large and out of control) without killing
> it. I tried to go up and mark the entire buffer and cut it (as I did
> with a regular bash shell) however, it says "Attempt modify read-only
> text." Toggling read-only does nothing. Any ideas?

I type "clear" at the eshell prompt.  This is implemented by the
following:

(defun kai-eshell-erase-buffer ()
  (interactive)
  (let ((eshell-buffer-maximum-lines 0))
    (eshell-truncate-buffer)))

(defalias 'eshell/clear 'kai-eshell-erase-buffer)

You might wish to bind kai-eshell-erase-buffer to a key, too.

kai
--
Symbol's function definition is void: signature

 
 
 

Clearing the buffer in eshell

Post by Joe Casadont » Thu, 30 Aug 2001 22:11:49



Quote:> eshell Question: I have been trying to find some way to clear the
> buffer (after while it gets large and out of control) without
> killing it. I tried to go up and mark the entire buffer and cut it
> (as I did with a regular bash shell) however, it says "Attempt
> modify read-only text." Toggling read-only does nothing. Any ideas?

This and a couple of other goodies are included in em-joc:

    http://www.northbound-train.com/emacs.html

,----[ em-joc ]
| em-joc.el (zip / gz)  [Last Revision: 01-Jan-2001; Version: 1.5; Change Log]
|
| Provides some small additional function of eshell, the full-featured
| shell written in elisp. Functions include a prompt replacement
| (primarily replaces value of $HOME with a "~"), a "clear" function,
| which clears the screen/buffer much like clear (Unix) or cls (DOS),
| and a remote command, which lets you send the eshell a command from
| some outside piece of lisp code.
`----

--
Regards,

joe
Joe Casadonte

------------------------------------------------------------------------------
         Llama Fresh Farms => http://www.northbound-train.com
   Gay Media Resource List => http://www.northbound-train.com/gaymedia.html
            Perl for Win32 => http://www.northbound-train.com/perlwin32.html
               Emacs Stuff => http://www.northbound-train.com/emacs.html
          Music CD Trading => http://www.northbound-train.com/cdr.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------

 
 
 

Clearing the buffer in eshell

Post by John Wiegle » Fri, 31 Aug 2001 03:18:52


Quote:>>>>> On Wed Aug 29, Brian writes:
> Hey all.  eshell Question: I have been trying to find some way to
> clear the buffer (after while it gets large and out of control)
> without killing it. I tried to go up and mark the entire buffer and
> cut it (as I did with a regular bash shell) however, it says
> "Attempt modify read-only text." Toggling read-only does
> nothing. Any ideas?

Type C-c C-t.  This will truncate the buffer down to a specified
minimum number of bytes.

John