Variable: tab-bar-new-tab-choice
tab-bar-new-tab-choice is a customizable variable defined in
tab-bar.el.gz.
Value
t
Documentation
Defines what to show in a new tab.
If t, start a new tab with the current buffer, i.e. the buffer
that was current before calling the command that adds a new tab
(this is the same what make-frame does by default).
If the value is the symbol window, then keep the selected
window as a single window on the new tab, and keep all its
window parameters except window-atom and window-side.
If the value is a string, use it as a buffer name to switch to
if such buffer exists, or 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 clone, duplicate the contents of the tab that was active
before calling the command that adds a new tab.
This variable was added, or its default value changed, in Emacs 27.1.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defcustom tab-bar-new-tab-choice t
"Defines what to show in a new tab.
If t, start a new tab with the current buffer, i.e. the buffer
that was current before calling the command that adds a new tab
(this is the same what `make-frame' does by default).
If the value is the symbol `window', then keep the selected
window as a single window on the new tab, and keep all its
window parameters except `window-atom' and `window-side'.
If the value is a string, use it as a buffer name to switch to
if such buffer exists, or 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 `clone', duplicate the contents of the tab that was active
before calling the command that adds a new tab."
:type '(choice (const :tag "Current buffer" t)
(const :tag "Current window" window)
(string :tag "Buffer" "*scratch*")
(directory :tag "Directory" :value "~/")
(file :tag "File" :value "~/.emacs")
(function :tag "Function")
(const :tag "Duplicate tab" clone))
:group 'tab-bar
:version "27.1")