Tutorialnew name category new-window




Prev | Up | Next | Back | Forward | Online Documentation Home Page
  Keys Menu
X Shift+F2 File/New
MS Control+N File/New


Creates a new buffer with the given name and syntactic category category and displays it in a window. Name defaults to *untitled* and category defaults to either TEXT or the root category depending on whether editor variable sg:textual-mode is true or false.

If there is already a buffer with the given name, the new buffer is named name<i>, where integer i is chosen so that the buffer name is unique. The new buffer is initialized with a placeholder for the given category, the write permission is set to read-write, and the buffer is not associated with any file.

If new-window is yes, the new buffer is displayed in a new window and if no, the new buffer is displayed in the window from which the command was invoked. A third possibility for new-window is replace-all. Suppose the command was invoked in a window displaying buffer b and several other windows also display buffer b, possibly in different views. Then all existing windows displaying b are switched to the new buffer, but the association of windows to views is maintained. This option permits multi-window, multi-view setups to be reused for different buffers.


Forward