search (and file-search) patch