Tutorialopen file category new-window




Prev | Up | Next | Back | Forward | Online Documentation Home Page
  Keys Menu
X Control+X Control+F or F2 or Control+X Control+R or Control+X Control+V File/Open...
MS Control+O File/Open...


Reads the given file into a new buffer. File can be a full or relative path name, but the buffer name is just the base name of the file. If a buffer already exists with that name, a new buffer is created with the name suffixed by <i>, for some distinct integer i. The buffer becomes associated with the file for subsequent output commands. If a buffer is already open on that file, then the window is changed to display that buffer without reading the 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 and the association of windows to view is left unchanged. This option permits multi-window, multi-view setups to be reused for different files.

If the category is TEXT, the file is read without being parsed. Otherwise, if the file is in text format, it is parsed as syntactic category category. If syntactically incorrect, the text is left unparsed and the insertion cursor is positioned near the error. The buffer is associated with the given category and the file format text. If the file is in structure or attributed format, it is necessarily syntactically correct. An error message is issued if the file is not an object of the given category, and no action is taken.

The dialog box associated with the command contains a list of frequently used syntactic categories. Double-clicking Select on a category name invokes the command on that name.


Forward