0

I am learning Emacs and I would like to know how to get rid of the Emacs Welcome to the Emacs shell and eshell/clear messages when I open a new eshell.

I used this question to start an eshell at startup and this question to add a clear command similar to that of Terminal. In my .zshrc I add a file called .hushlogin to mute the default message.

Now I would like for when I boot up Emacs, the two messages that print at the beginning of an eshell buffer to not appear.

I noticed when I source my init file, all of the functions print as well.

This is a screenshot of what appears any time I create a new eshell enter image description here

My .emacs file is below if that helps as well

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes '(tango-dark))
 '(inhibit-startup-screen t)
 '(markdown-command "/usr/local/bin/pandoc")
 '(package-selected-packages '(pandoc markdown-mode)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(setq default-directory "~/")
(setq command-line-default-directory "~/")

(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/"))
(package-initialize)

(setq markdown-split-window-direction 'right)

;Start new Emacs window with eshell
(add-hook 'emacs-startup-hook 'eshell)

This is my eshell-rc-script as well if that helps

alias emacs 'find-file $1'

#Clear the eshell buffer.
(defun eshell/clear ()
       (let ((eshell-buffer-maximum-lines 0)) (eshell-truncate-buffer)))
2
  • Customize eshell-banner-message to get rid of the Welcome message.
    – NickD
    Jul 16 at 1:13
  • Ok, I can see how I customize that. Thanks! Any idea how to get rid of the function names printing when sourcing a file?
    – Jav Solo
    Jul 16 at 12:08
0

I found a way of doing this that will easily get the results I want. By simply inserting a call to the clear function in my eshell-rc-script to run the command right after, it will clear the screen and both messages no longer appear. The line I added was

eshell/clear

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.