Variable: initial-buffer-choice

initial-buffer-choice is a customizable variable defined in startup.el.gz.

Value

nil

Documentation

Buffer to show after starting Emacs.

If the value is nil and inhibit-startup-screen is nil, show the startup screen. If the value is a string, switch to a buffer visiting the file or directory that the string specifies. If the value is a function, call it with no arguments and switch to the buffer that it returns. If t, open the *scratch* buffer.

When initial-buffer-choice is non-nil, the startup screen is inhibited.

If you use emacsclient with no target file, then it obeys any string or function value that this variable has.

This variable was added, or its default value changed, in Emacs 23.1.

Probably introduced at or before Emacs version 23.1.

Source Code

;; Defined in /usr/src/emacs/lisp/startup.el.gz
(defcustom initial-buffer-choice nil
  "Buffer to show after starting Emacs.
If the value is nil and `inhibit-startup-screen' is nil, show the
startup screen.  If the value is a string, switch to a buffer
visiting the file or directory that the string specifies.  If the
value is a function, call it with no arguments and switch to the buffer
that it returns.  If t, open the `*scratch*' buffer.

When `initial-buffer-choice' is non-nil, the startup screen is
inhibited.

If you use `emacsclient' with no target file, then it obeys any
string or function value that this variable has."
  :type '(choice
	  (const     :tag "Startup screen" nil)
	  (directory :tag "Directory" :value "~/")
	  (file      :tag "File" :value "~/.emacs")
	  ;; Note sure about hard-coding this as an option...
	  (const     :tag "Remember Mode notes buffer" remember-notes)
	  (function  :tag "Function")
	  (const     :tag "Lisp scratch buffer" t))
  :version "23.1")