Rename local variable `emit` to `filter`