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


7.4.5.10 find-buffer-visiting

Function: find-buffer-visiting filename &optional predicate

This is like ‘get-file-buffer’, except that it can return any buffer visiting the file possibly under a different name. That is, the buffer’s ‘buffer-file-name’ does not need to match the expansion of FILENAME exactly, it only needs to refer to the same file.

If PREDICATE is non-‘nil’, it should be a function of one argument, a buffer visiting FILENAME. The buffer is only considered a suitable return value if PREDICATE returns non-‘nil’.