开发者

Can I change the emacs fancy-startup-text?

开发者 https://www.devze.com 2022-12-25 06:57 出处:网络
i would like to change the emacs fancy-startup-text (the splash screen that shows up, i know how to close it but not how to replace it with my own). idea is to build my own startup page that fetches s

i would like to change the emacs fancy-startup-text (the splash screen that shows up, i know how to close it but not how to replace it with my own). idea is to build my own startup page that fetches some things from the web (news items, sport fixtu开发者_StackOverflow中文版res, word of the day etc) for emacs.


You can use a startup hook to do whatever you want after Emacs starts up:

(add-hook 'emacs-startup-hook 'my-startup-fcn)
(defun my-startup-fcn ()
  "do fancy things"
  (let ((my-buffer (get-buffer-create "my-buffer")))
    (with-current-buffer my-buffer
      ;; this is what you customize
      (insert "some stuff\nmore stuff"))
    (switch-to-buffer my-buffer)))


User Option: initial-buffer-choice

This variable, if non-nil, determines a file or buffer for Emacs to display after starting up, instead of the startup screen. If its value is t, Emacs displays the ‘scratch’ buffer. If its value is a string, that specifies the name of a file for Emacs to visit.

– Emacs Manual


In your .emacs file, write code that sets the initial-scratch-message variable, which controls the text that appears in the *scratch* buffer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号