[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add function eshell/clear to clear current eshell buffer
From: |
Gregor Zattler |
Subject: |
Re: Add function eshell/clear to clear current eshell buffer |
Date: |
Mon, 9 Mar 2015 11:11:26 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Vibhav,
* address@hidden <address@hidden> [09. Mar. 2015]:
> +(defun eshell/clear ()
> + "Clear the eshell-buffer"
Now this command does not clear the eshell buffer any more, but the
eshell window. I think the doc string should say so because this has
security implications: The user may think some info is gone but actually
it’s only no longer visible. How about:
"Scroll contents out of the eshell window by inserting newlines."
(let ((number-newlines (count-lines (window-start) (point))))
(insert (make-string number-newlines ?\n)))
(eshell-send-input))
> + (interactive)
> + (let ((number-newlines (count-lines (window-start) (point))))
> + (insert (make-string number-newlines ?\n)))
> + (eshell-send-input))
Doesn't this insert the newlines where ever the point is?
Shouldn't it append the newlines to the very end of the buffer
where ever point was before?
Ciao; Gregor
- [PATCH] Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/03/08
- Re: [PATCH] Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/03/08
- Re: [PATCH] Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/03/08
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/03/09
- Re: Add function eshell/clear to clear current eshell buffer, vibhavp, 2015/03/09
- Re: Add function eshell/clear to clear current eshell buffer, Eli Zaretskii, 2015/03/09
- Re: Add function eshell/clear to clear current eshell buffer, Vibhav Pant, 2015/03/09
- Re: Add function eshell/clear to clear current eshell buffer, Bozhidar Batsov, 2015/03/10
- Re: Add function eshell/clear to clear current eshell buffer, Ricardo Wurmus, 2015/03/10