[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp code for replacing every other occurence in a line?
From: |
Grant Rettke |
Subject: |
Re: elisp code for replacing every other occurence in a line? |
Date: |
Mon, 12 May 2014 12:41:21 -0500 |
What is the first simple case you want to handle that you would define
as successful?
May you post 3-5 sample tests of how you want it to work and would
know that it is working correctly?
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
grettke@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
On Mon, May 12, 2014 at 12:32 PM, Frank Stutzman <stutzman@cat2.kjsl.com> wrote:
> This is probably trivial for emacs-masters, but I'm not one and
> the solution is escaping me...
>
> Say I have a buffer that have intermittant lines that look like:
>
> a,b,c,DD,e,f,g,DD,h
> i,j,k,DD,l,m,n,DD,o
>
> I'm trying to write some lisp code that will change them so that
> they look like:
>
> a,b,c,DD,e,f,g,YY,h
> i,j,k,DD,l,m,n,ZZ,o
>
> DD,YY and ZZ will always be the same strings. These pairs of lines
> may not always be found sequentially in the file. For what its worth,
> this buffer is a CSV delimited buffer although I would prefer to do this
> without using any special mdoes.
>
> --
> Frank Stutzman
>
>