[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add function eshell/clear to clear current eshell buffer
From: |
vibhavp |
Subject: |
Re: Add function eshell/clear to clear current eshell buffer |
Date: |
Sun, 19 Apr 2015 01:43:49 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Attached a patch which adds a clear-scrollback command to eshell. If it
looks good, I'll push the patch to master with the relevant info in
etc/NEWS.
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 15120cb..21026b2 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -878,6 +878,12 @@ When run interactively, widen the buffer first."
(insert (make-string number-newlines ?\n)))
(eshell-send-input))
+(defun eshell/clear-scrollback ()
+ "Clear the scrollback content of the eshell window."
+ (interactive)
+ (let ((inhibit-read-only t))
+ (erase-buffer)))
+
(defun eshell-get-old-input (&optional use-current-region)
"Return the command input on the current line."
(if use-current-region
--
Vibhav Pant
address@hidden
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, chad, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer,
vibhavp <=
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/18
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/04/19
- Re: Add function eshell/clear to clear current eshell buffer, Ted Zlatanov, 2015/04/20