0

I want to add a string to the startup screen. I found this question and customized the fancy-startup-text variable, like this

  (add-to-list 'fancy-startup-text '("\nYou are running a customized Emacs configuration. See "  :link
    ("here"
     #[257 "\300\301!\207"
           [browse-url-default-browser "http://github.com/izahn/dotemacs/"]
           3 "\n\n(fn BUTTON)"]
     "Open the README file")
    "\nfor information about these customizations.\n"))

That worked on my desktop computer, but when I tried on my laptop (with a small screen) I find a different startup screen, without the Emacs logo at the top, and without my additional string. I found a discussion on the emacs mailing list discussing how different startup screens are shown depending on the size of the initial frame (unfortunately I cannot locate this now), so I think this is expected. But what I cannot figure out is how to customize the text for the simple startup screen (without the logo) that is shown when the initial frame is small. I tried customizing fancy-about-text, i.e.

 (add-to-list 'fancy-about-text '("\nYou are running a customized Emacs configuration. See "  :link
    ("here"
     #[257 "\300\301!\207"
           [browse-url-default-browser "http://github.com/izahn/dotemacs/"]
           3 "\n\n(fn BUTTON)"]
     "Open the README file")
    "\nfor information about these customizations.\n"))

but that did not work.

0

It doesn't look like there is any variable you can set to insert text into the text-only startup screen that is displayed when Emacs starts with a small initial frame. It looks like fancy-startup-screen gets called if the display is big enough, otherwise normal-splash-screen is called. Unlike fancy-startup-screen the contents that get inserted into the buffer by normal-splash-screen are all hard coded into the function.

For now I've set Emacs to startup in full screen, so the fancy startup screen is used. An alternative would be to set inhibit-startup-screen and the add fancy-startup-screen to the emacs-startup-hook.

Update: I'm now using the following hack to always use fancy-startup-screen, even on small displays:

(defun always-use-fancy-splash-screens-p () 1)
  (defalias 'use-fancy-splash-screens-p 'always-use-fancy-splash-screens-p)
| improve this answer | |
0

I wanted to do something similar to what Ista originally asked about, but different enough that the method described would not work for me.

I wanted to insert information into the *GNU Emacs* splash buffer after the Emacs version and copyright lines. Adding to a list like fancy-about-text would not accomplish this since the Emacs version info and copyright lines are not in a list, but are hard coded into the fancy-startup-tail function. Unfortunately there is no hook that is run following the execution of the fancy-startup-tail function. I wrote a function that did what I wanted without hard coding anything that was to be inserted into it. I used the Elisp function advice-add to add my function as an advice to the fancy-startup-tail function to be run after it had completed execution. I believe that this approach would also answer Ista's desire to modify the normal splash screen.

| improve this answer | |

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.