From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Stutzman Newsgroups: gmane.emacs.help Subject: Re: elisp code for replacing every other occurence in a line? Date: Mon, 12 May 2014 19:22:22 +0000 (UTC) Organization: Nothing witty to write here Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1399922723 19599 80.91.229.3 (12 May 2014 19:25:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 May 2014 19:25:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 12 21:25:21 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wjvqi-0001jY-O2 for geh-help-gnu-emacs@m.gmane.org; Mon, 12 May 2014 21:25:20 +0200 Original-Received: from localhost ([::1]:39513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjvqi-00004x-8h for geh-help-gnu-emacs@m.gmane.org; Mon, 12 May 2014 15:25:20 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 11 Original-NNTP-Posting-Host: cat2.kjsl.com Original-X-Trace: news.kjsl.com 1399922542 87721 66.109.111.28 (12 May 2014 19:22:22 GMT) Original-X-Complaints-To: usenet@news.kjsl.com Original-NNTP-Posting-Date: Mon, 12 May 2014 19:22:22 +0000 (UTC) User-Agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/9.2-RELEASE-p3 (amd64)) Original-Xref: usenet.stanford.edu gnu.emacs.help:205350 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97617 Archived-At: Nevermind.... It took quite a while to get my brain into elisp mode. Once that happened I realized that my solution was write there on the help page for replace-string. Right there where it says you probably don't want to use replace-string. Pretty much the only real change I had to do was to use the COUNT option on search-forward. -- Frank Stutzman