From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Angus Comber Newsgroups: gmane.emacs.help Subject: Search and replace for a single file using a pattern file Date: Thu, 4 Jan 2018 02:02:29 -0800 (PST) Message-ID: <240d8da5-5078-4ecc-a285-0719841d124a@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1515060215 17171 195.159.176.226 (4 Jan 2018 10:03:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 10:03:35 +0000 (UTC) Injection-Date: Thu, 04 Jan 2018 10:02:29 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 04 11:03:31 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX2N1-00048Z-Hi for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 11:03:31 +0100 Original-Received: from localhost ([::1]:48114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX2P0-0000c3-Pv for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 05:05:34 -0500 X-Received: by 10.55.59.203 with SMTP id i194mr2853340qka.6.1515060149828; Thu, 04 Jan 2018 02:02:29 -0800 (PST) X-Received: by 10.31.149.200 with SMTP id x191mr444388vkd.3.1515060149601; Thu, 04 Jan 2018 02:02:29 -0800 (PST) Original-Path: usenet.stanford.edu!g35no137143qtk.1!news-out.google.com!t48ni66qtc.1!nntp.google.com!g35no137140qtk.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=80.194.194.72; posting-account=SYwseQoAAABBYGT-AD1YXrcTXHxLkDZy Original-NNTP-Posting-Host: 80.194.194.72 Original-Xref: usenet.stanford.edu gnu.emacs.help:221450 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115566 Archived-At: I have some horrible logs where integers are printed for states and I want to do a global search and replace on the file to eg replace integer x with a string. I can obviously do individually using c-m-% but that is fairly laborious. So use of a search and replace mapping in a text file would be really convenient. Is this possible? any suggestions?