find-file - Load a file
n find-file "file-name" (C-x C-f)
find-file finds the named file file-name. If it is already in a buffer, make that buffer active in the current window, otherwise attempt to create a new buffer and read the file into it.
The numeric argument n is used to modify the default behavior of the command, where the bits are defined as follows:
0x01
0x02
0x04
0x08
0x10
Text files are usually thought of as named collections of text residing on disk (or some other storage medium). In MicroEmacs 2009 the disk based versions of files come into play only when reading into or writing out buffers. The link between the physical file and the buffer is through the associated file name.
MicroEmacs 2009 permits full file names, i.e. you can specify:
disk:\directories\filename.extension
or (UNIX)
/directories/filename.extension
If the disk and directories are not specified, the current buffers disk/ directory is used. Several points should be noted in respect to the methods that MicroEmacs utilizes in the handling of files:-
If you do not wish to perform any edits but merely browse the file(s), add the view(2m) mode to the buffer or ask for the file to be read in for viewing only.
If the file does not exist and the variable $rcs-file(5) is set then the existence of the RCS file is tested. If the rcs file exists then it will be checked out using a command-line created from the variable $rcs-co-com(5). If the check-out is successful then this file is loaded.
This raw interface for supporting file revision control systems has been adapted to support SCCS and Visual Source Safe see help on variable $rcs-file for more information and examples.
MicroEmacs supports http file loading, this is available by default on UNIX systems but must be compiled in on win32 platforms (socket libraries not available on all win95 machines so cannot be compiled in by default). When available a http file can be loaded by simply executing find-file and giving the http file name, i.e. "http://user:password@address:port/file". Only the http://, address and /file components are mandatory, the rest can usually be omitted. e.g.:
find-file "http://www.jasspa.com/index.html"
See help page on %http-proxy-addr(5) for information on HTTP proxy server support.
MicroEmacs supports ftp file loading, this is identical to http except the prefix ftp:// is used as opposed to http://. The user name and password defaults to guest in the absence of both these fields. If the user name is supplied but not the password the password will be prompted for; this can be useful as the password will not be stored or written to the history file. Connection is by default on port 21.
find-file "ftp://<me>:<password>@members.xoom.com/jasspa/index.html"
See also ftp(3).
The progress of the FTP transfer, and the FTP commands issued, may be viewed in the *ftp-console* buffer. This is popped up depending on the setting of the %ftp-flags(5) variable.
The base name part (i.e. not the path) of file-name can contain wild-card characters compatible with most file systems, namely:-
?
[abc]
[a-d]
[^abc]
*
If the name matches more than one file, a buffer will be created for each matching file. Note that these are not the same wild-card characters used by regex.
For ftp and http then a ftp console window is opened up to show the progress of the transfer (when configured), this is described in ftp(3).
auto(2m), binary(2m), crypt(2m), rbin(2m), time(2m), view(2m), buffer-mode(2), file-attrib(3), file-op(2), find-bfile(3), ftp(3), next-window-find-file(2), page-bfile(3), page-file(3), read-file(2), save-buffer(2), view-file(2), write-buffer(2), $rcs-file(5), %ftp-flags(5), %http-flags(5), %http-proxy-addr(5).
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12