2
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format  supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'random

When I set dotspacemacs-startup-banner to 'random in my dot file, I got the following warning message when executing emacs --debug-init:

Debugger entered--Lisp error: (void-function insert-string)
  (insert-string (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file) (let ((banner-width 0)) (while (not ...) (let ... ...) (forward-line 1)) (goto-char 0) (let (...) (while ... ... ...))) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  spacemacs-buffer/insert-ascii-banner-centered("/Users/sunqingyao/.emacs.d/core/banners/000-banner.txt")
  (if (image-type-available-p (intern (file-name-extension banner))) (spacemacs-buffer//insert-image-banner banner) (spacemacs-buffer/insert-ascii-banner-centered banner))
  (progn (spacemacs-buffer/message (format "Banner: %s" banner)) (if (image-type-available-p (intern (file-name-extension banner))) (spacemacs-buffer//insert-image-banner banner) (spacemacs-buffer/insert-ascii-banner-centered banner)) (spacemacs-buffer//inject-version))
  (if banner (progn (spacemacs-buffer/message (format "Banner: %s" banner)) (if (image-type-available-p (intern (file-name-extension banner))) (spacemacs-buffer//insert-image-banner banner) (spacemacs-buffer/insert-ascii-banner-centered banner)) (spacemacs-buffer//inject-version)))
  (progn (if banner (progn (spacemacs-buffer/message (format "Banner: %s" banner)) (if (image-type-available-p (intern (file-name-extension banner))) (spacemacs-buffer//insert-image-banner banner) (spacemacs-buffer/insert-ascii-banner-centered banner)) (spacemacs-buffer//inject-version))) (spacemacs-buffer//insert-buttons) (spacemacs//redisplay))
  (let ((banner (spacemacs-buffer//choose-banner)) (buffer-read-only nil)) (progn (if banner (progn (spacemacs-buffer/message (format "Banner: %s" banner)) (if (image-type-available-p (intern (file-name-extension banner))) (spacemacs-buffer//insert-image-banner banner) (spacemacs-buffer/insert-ascii-banner-centered banner)) (spacemacs-buffer//inject-version))) (spacemacs-buffer//insert-buttons) (spacemacs//redisplay)))
  spacemacs-buffer/insert-banner-and-buttons()
  (save-excursion (if (> (buffer-size) 0) (progn (set (quote save-line) (line-number-at-pos)) (let ((inhibit-read-only t)) (erase-buffer)))) (spacemacs-buffer/set-mode-line "") (setq spacemacs-buffer--note-widgets nil) (spacemacs-buffer/insert-banner-and-buttons) (if (and (boundp (quote spacemacs-initialized)) spacemacs-initialized) (progn (configuration-layer/display-summary emacs-start-time) (if dotspacemacs-startup-lists (progn (spacemacs-buffer/insert-startupify-lists))) (spacemacs-buffer//insert-footer) (spacemacs-buffer/set-mode-line spacemacs--default-mode-line) (force-mode-line-update) (spacemacs-buffer-mode)) (add-hook (quote emacs-startup-hook) (quote spacemacs-buffer//startup-hook) t)))
  (save-current-buffer (set-buffer (get-buffer-create spacemacs-buffer-name)) (page-break-lines-mode) (save-excursion (if (> (buffer-size) 0) (progn (set (quote save-line) (line-number-at-pos)) (let ((inhibit-read-only t)) (erase-buffer)))) (spacemacs-buffer/set-mode-line "") (setq spacemacs-buffer--note-widgets nil) (spacemacs-buffer/insert-banner-and-buttons) (if (and (boundp (quote spacemacs-initialized)) spacemacs-initialized) (progn (configuration-layer/display-summary emacs-start-time) (if dotspacemacs-startup-lists (progn (spacemacs-buffer/insert-startupify-lists))) (spacemacs-buffer//insert-footer) (spacemacs-buffer/set-mode-line spacemacs--default-mode-line) (force-mode-line-update) (spacemacs-buffer-mode)) (add-hook (quote emacs-startup-hook) (quote spacemacs-buffer//startup-hook) t))))
  (progn (setq spacemacs-buffer--banner-length (window-width) spacemacs-buffer--last-width spacemacs-buffer--banner-length) (save-current-buffer (set-buffer (get-buffer-create spacemacs-buffer-name)) (page-break-lines-mode) (save-excursion (if (> (buffer-size) 0) (progn (set (quote save-line) (line-number-at-pos)) (let ((inhibit-read-only t)) (erase-buffer)))) (spacemacs-buffer/set-mode-line "") (setq spacemacs-buffer--note-widgets nil) (spacemacs-buffer/insert-banner-and-buttons) (if (and (boundp (quote spacemacs-initialized)) spacemacs-initialized) (progn (configuration-layer/display-summary emacs-start-time) (if dotspacemacs-startup-lists (progn (spacemacs-buffer/insert-startupify-lists))) (spacemacs-buffer//insert-footer) (spacemacs-buffer/set-mode-line spacemacs--default-mode-line) (force-mode-line-update) (spacemacs-buffer-mode)) (add-hook (quote emacs-startup-hook) (quote spacemacs-buffer//startup-hook) t)))) (if save-line (progn (goto-char (point-min)) (forward-line (1- save-line)) (forward-to-indentation 0)) (spacemacs-buffer/goto-link-line)) (switch-to-buffer spacemacs-buffer-name) (spacemacs//redisplay))
  (if (or (not (eq spacemacs-buffer--last-width (window-width))) (not buffer-exists) refresh) (progn (setq spacemacs-buffer--banner-length (window-width) spacemacs-buffer--last-width spacemacs-buffer--banner-length) (save-current-buffer (set-buffer (get-buffer-create spacemacs-buffer-name)) (page-break-lines-mode) (save-excursion (if (> (buffer-size) 0) (progn (set (quote save-line) (line-number-at-pos)) (let (...) (erase-buffer)))) (spacemacs-buffer/set-mode-line "") (setq spacemacs-buffer--note-widgets nil) (spacemacs-buffer/insert-banner-and-buttons) (if (and (boundp (quote spacemacs-initialized)) spacemacs-initialized) (progn (configuration-layer/display-summary emacs-start-time) (if dotspacemacs-startup-lists (progn ...)) (spacemacs-buffer//insert-footer) (spacemacs-buffer/set-mode-line spacemacs--default-mode-line) (force-mode-line-update) (spacemacs-buffer-mode)) (add-hook (quote emacs-startup-hook) (quote spacemacs-buffer//startup-hook) t)))) (if save-line (progn (goto-char (point-min)) (forward-line (1- save-line)) (forward-to-indentation 0)) (spacemacs-buffer/goto-link-line)) (switch-to-buffer spacemacs-buffer-name) (spacemacs//redisplay)))
  (let ((buffer-exists (buffer-live-p (get-buffer spacemacs-buffer-name))) (save-line nil)) (if (or (not (eq spacemacs-buffer--last-width (window-width))) (not buffer-exists) refresh) (progn (setq spacemacs-buffer--banner-length (window-width) spacemacs-buffer--last-width spacemacs-buffer--banner-length) (save-current-buffer (set-buffer (get-buffer-create spacemacs-buffer-name)) (page-break-lines-mode) (save-excursion (if (> (buffer-size) 0) (progn (set ... ...) (let ... ...))) (spacemacs-buffer/set-mode-line "") (setq spacemacs-buffer--note-widgets nil) (spacemacs-buffer/insert-banner-and-buttons) (if (and (boundp ...) spacemacs-initialized) (progn (configuration-layer/display-summary emacs-start-time) (if dotspacemacs-startup-lists ...) (spacemacs-buffer//insert-footer) (spacemacs-buffer/set-mode-line spacemacs--default-mode-line) (force-mode-line-update) (spacemacs-buffer-mode)) (add-hook (quote emacs-startup-hook) (quote spacemacs-buffer//startup-hook) t)))) (if save-line (progn (goto-char (point-min)) (forward-line (1- save-line)) (forward-to-indentation 0)) (spacemacs-buffer/goto-link-line)) (switch-to-buffer spacemacs-buffer-name) (spacemacs//redisplay))))
  spacemacs-buffer/goto-buffer()
  spacemacs/init()
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (message (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat (file-name-directory load-file-name) "core/core-load-paths.el")) (require (quote core-spacemacs)) (spacemacs/init) (spacemacs/maybe-install-dotfile) (configuration-layer/sync) (spacemacs-buffer/display-info-box) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "/Users/sunqingyao/.emacs.d/init.el" nil t)  ; Reading at buffer position 1302
  load-with-code-conversion("/Users/sunqingyao/.emacs.d/init.el" "/Users/sunqingyao/.emacs.d/init.el" t t)
  load("/Users/sunqingyao/.emacs.d/init" t t)
  #[0 "\205\266   \306=\203\307\310Q\202? \311=\204\307\312Q\202?\313\307\314\315#\203*\316\202?\313\307\314\317#\203>\320\321\322!D\nB\323\202?\316\324\325\324\211#\210\324=\203e\326\327\330\307\331Q!\"\325\324\211#\210\324=\203d\210\203\247\332!\333\232\203\247\334!\211\335P\336!\203\201\211\202\214\336!\203\213\202\214\314\262\203\245\337\"\203\243\340\341#\210\342\343!\210\266\f?\205\264\314\325\344\324\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
  command-line()
  normal-top-level()
4

See this issue. This problem should be fixed in the next release.

Quick fix:

Change the function insert-string to insert in ~/.emacs.d/core/core-spacemacs-buffer.el, and everything works well.

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.