[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to really clear eshell buffer?
From: |
Colin Baxter |
Subject: |
Re: How to really clear eshell buffer? |
Date: |
Sat, 09 Jun 2018 07:27:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
>>>>> "Colin" == Colin Baxter <m43cap@yandex.com> writes:
>>>>> "Bob" == Bob Newell <bobnewell@bobnewell.net> writes:
>>> I want to really clear an eshell buffer, which means that all
>>> former
Bob> output is deleted, not just scrolled away.
Bob> (defun clear-eshell () (interactive) (setq inhibit-read-only t)
Bob> (kill-region (point-min) (point-max)))
Bob> I don't see any real need to switch back to read-only mode.
Bob> Tie to a key if you wish and run while in the eshell buffer.
Colin> If you do, via say:
Colin> (add-hook 'eshell-mode-hook (lambda () (local-set-key (kbd
Colin> "C-l") #'clear-eshell)))
Colin> then the eshell prompt is lost - regained if RET is entered.
Just need to add (eshell-send-input) to the defun. Sorry about the
noise.
Best wishes,
- How to really clear eshell buffer?, Florian Lindner, 2018/06/08
- Re: How to really clear eshell buffer?, Bob Newell, 2018/06/08
- Message not available
- Re: How to really clear eshell buffer?, Emanuel Berg, 2018/06/09
- Re: How to really clear eshell buffer?, Emanuel Berg, 2018/06/09
- Re: How to really clear eshell buffer?, Emanuel Berg, 2018/06/09
- Re: How to really clear eshell buffer?, Bob Newell, 2018/06/09
- Message not available
- Re: How to really clear eshell buffer?, Emanuel Berg, 2018/06/10
- Re: How to really clear eshell buffer?, Emanuel Berg, 2018/06/10