From 9d66c2a22cd555474e2e393c826655fd6224073f Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Thu, 18 Nov 2021 20:07:27 +0100 Subject: [PATCH] [Emacs] Set eshell/clear as eshell/clear-scrollback I cannot understand the reason why this is not the default behaviour. --- org/config/emacs.org | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/org/config/emacs.org b/org/config/emacs.org index 7d79c2d..722312e 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -2744,8 +2744,15 @@ respectively allow me to open a file in Emacs, and same but in another window. #+name: eshell-alias-open #+begin_src emacs-lisp :tangle no -(defalias 'open 'find-file) -(defalias 'openo 'find-file-other-window) +(defalias 'open #'find-file) +(defalias 'openo #'find-file-other-window) +#+end_src + +The default behavior of ~eshell/clear~ is not great at all, although it +clears the screen it also scrolls all the way down. Therefore, let’s +alias it to ~eshell/clear-scrollback~ which has the correct behavior. +#+begin_src emacs-lisp +(defalias 'eshell/clear #'eshell/clear-scrollback) #+end_src As you see, these were not declared in my dedicated aliases file but