Next: Buffer Name and File Up: Mini-Buffer Previous: Command Line Completion Contents

## File Names

jed takes every file name and ``expands it'' according to a set of rules which vary according to the Operating System. For concreteness, consider jed running under MS-DOS. Suppose the user reads a new file into the editor via the `find_file` command which emacs binds to CTRL-X CTRL-F. Then the following might be displayed in the mini-buffer:

          Find File: C:\JED\SLANG\

Here jed is prompting for a file name in the directory `\JED\SLANG` on disk `C:`. However, suppose the user wants to get the file `C:\JED\SRC\VIDEO.C`. Then the following responses produce equivalent filenames when jed expands them internally:

          Find File: C:\JED\src\video.c
          Find File: C:\JED\SLANG\..\src\video.c
          Find File: C:\JED\SLANG\../src/video.c

Note that the on MS-DOS systems, jed replaces the `/` with a `\` and that case is not important. Now suppose you wish to get the file `VIDEO.C` from disk `A:`. The following are also valid:

          Find File: A:\video.c
          Find File: A:video.c
          Find File: C:\JED\SLANG\a:\video.c

In the last case, jed is smart enough to figure out what is really meant. Although the above examples are for MS-DOS systems, the rules also apply to Unix and VMS systems as well. The only change is the file name syntax. For example, on VMS

          sys$manager:[misc]dev$user:[davis.jed]vms.c
          dev$user:[davis.jed]vms.c

become equivalent filenames upon expansion. For unix, the following are equivalent:

          /user1/users/davis/jed/unix.c
          /usr/local/src//user1/users/davis/jed/unix.c
          /usr/local/src/~/jed/unix.c

Note the last example: the tilde character `~` always expands into the users `HOME` directory, in this case to `/user1/users/davis`.

When jed writes a buffer out to a file, it usually prompts for a file name in the minibuffer displaying the directory associated with the current buffer. At this point a name can be appended to the directory string to form a valid file name or the user may simply hit the RET key. If the latter alternative is chosen, jed simply writes the buffer to the file already associated with the buffer. Once the buffer is written to a file, the buffer becomes attached to that file.

Next: Buffer Name and File Up: Mini-Buffer Previous: Command Line Completion Contents