Home > Emacs > Xterm like Control-L in Eshell

Xterm like Control-L in Eshell

December 27th, 2006

If you want to emulate Control-L in Eshell (the Emacs Shell) like in Xterm, you can use this :

(defun eshell-show-minimum-output ()
  (interactive)
  (goto-char (eshell-beginning-of-output))
  (set-window-start (selected-window)
		    (save-excursion
		      (goto-char (point-max))
		      (line-beginning-position)))
  (eshell-end-of-output))

And add a key bind to it in your custom hook :

  (local-set-key "\C-l" 'eshell-show-minimum-output)</p><p>

Emacs

  1. No comments yet.
  1. No trackbacks yet.