Next: , Previous: , Up: Buffer Names and File Names   [Index]


7.4.5.9 get-file-buffer

Function: get-file-buffer filename

This function returns the buffer visiting file FILENAME, or ’nil’ if there is none. The argument FILENAME, which must be a string, is expanded then compared against the visited file names of all live buffers. Note that the buffer’s ‘buffer-file-name’ must match the expansion of FILENAME exactly.

In unusual circumstances, there can be more than one buffer visiting the same file name. In such cases, this function returns the first such buffer in the buffer list.