manywaypark's Blog
개발, 검색, 함수

eshell buffer 내용 지우기

emacs 2019. 1. 16. 16:43 by manywaypark

개발 도중에 eshell buffer에서 server 프로그램 등을 실행하는 경우가 있는데 가끔 며칠 동안 로그가 쌓이면 텍스트 검색 등이 무지하게 느려진다.

다음 함수를 *scratch* buffer 등에서 한번 eval(C-x, C-e)해주거나 초기화 과정에서 eval될 수 있도록 설정한 후에 eshell buffer에서 clear를 입력해주면 버퍼가 깨끗이 비워진다.

(defun eshell/clear ()

  "Clear the eshell buffer."

  (let ((inhibit-read-only t))

    (erase-buffer)

    (eshell-send-input)))

이걸 왜 여태껏 모르고 살았던 거지? Orz.


ref: https://emacs.stackexchange.com/questions/12503/how-to-clear-the-eshell


happy hackin'


PS. 컥... eshell/clear는 기본 함수구나.... eshell-truncate-buffer(C-c C-t)를 쓰면 될듯.

https://github.com/cpitclaudel/emacs/blob/master/lisp/eshell/esh-mode.el

분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

03-19 11:02