# How to use query-replace on filesets in emacs

Emacs documentation states that you can use query-replace on filesets to perform find/replace on multiple files.

This lets you perform certain operations, such as visiting, query-replace, and shell commands on all the files at once.

I've opened my particular fileset (i.e. via fileset-open) and attempted query/replace using both:

M-%


and

M-x query-replace


but can't get it to work on anything but the file (buffer) I'm currently in.

-

In order to run a command on all the files in a fileset, you have to use the filesets-run-cmd function and the command should be one of the commands that are specified in the filesets-commands variable. Specifically, in your case, you are supposed to run M-xfilesets-run-cmdQuery Replace.
(filesets-run-cmd &optional CMD-NAME FILESET MODE)
Run CMD-NAME (see filesets-commands') on FILESET.
filesets-commands`