wgrep-pt allows you to edit a pt buffer and apply those changes to the file buffer.