简体   繁体   English

如何让Emacs在没有那么夸张的情况下开始?

[英]How do I make Emacs start without so much fanfare?

Every time I start Emacs I see a page of help text and a bunch of messages suggesting that I try the tutorial. 每次启动Emacs时,我都会看到一个帮助文本页面和一堆消息,建议我尝试使用本教程。 How do I stop this from happening? 我如何阻止这种情况发生?

Emacs has a couple of variables which inhibit these actions. Emacs有几个变量可以抑制这些行为。 If you edit your emacs control file (.emacs) and insert the following: 如果您编辑emacs控制文件(.emacs)并插入以下内容:

;; inhibit-startup-echo-area-message MUST be set to a hardcoded 
;; string of your login name 
(setq inhibit-startup-echo-area-message "USERNAME")
(setq inhibit-startup-message t)

that should solve your problem. 这应该可以解决你的问题。 They basically set the inhibit parameters to true to prevent the behavior you want to get rid of. 它们基本上将suppress参数设置为true,以防止您想要摆脱的行为。

Put the following in your .emacs : 将以下内容放在.emacs

(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)

You can customize message in minibuffer therefore remove fanfare: 您可以在迷你缓冲区中自定义消息,从而删除大肆宣传:

;; Hide advertisement from minibuffer
(defun display-startup-echo-area-message ()
  (message ""))

Put the following in your personal init file (ususally ~/.emacs.el ): 将以下内容放在您的个人初始文件中(通常为~/.emacs.el ):

(setq inhibit-startup-message t)

(Or (setq inhibit-startup-screen t) in with older Emacs versions.) (使用较旧的Emacs版本的(或(setq inhibit-startup-screen t) 。)

You can also turn off the message "For information about GNU Emacs and the GNU system, type Ch Ca." 您还可以关闭消息“有关GNU Emacs和GNU系统的信息,请键入Ch Ca.” in the echo with the variable inhibit-startup-echo-area-message , but it is not enough to set it to t ; 在带有变量inhibit-startup-echo-area-message ,但将其设置为t是不够的; you must set it to your username. 您必须将其设置为您的用户名。 See the documentation for inhibit-startup-echo-area-message . 请参阅inhibit-startup-echo-area-message的文档。

如果您的init文件是字节编译的,请改用以下格式:

(eval '(setq inhibit-startup-echo-area-message "YOUR-USER-NAME"))

Add the below to your init file 将以下内容添加到您的init文件中

(setq inhibit-startup-message t
inhibit-startup-echo-area-message t) 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM