[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: line beginning with a regexp.

From: Chuck Siska
Subject: Re: line beginning with a regexp.
Date: Wed, 21 Feb 2001 09:48:21 -0800

anna --

no elisp needed, just an old hack:

Copy section to alter into another buffer, for safety
Go to beginning of that buffer
M-x replace-string "^Jcall procedure_name(" 
  with "@#$#@call procedure_name("
M-x replace-string "^J" with ""
M-x replace-string "@#$#@call procedure_name(" 
  with "^Jcall procedure_name("
Copy the altered section back

the point is to hide the "good" newlines, kill the "bad"
newlines, and replace the "good" newlines when done.
note, the newline character "^J" is entered by C-q C-j.
good luck.

-- chuck siska

G Annamalai wrote:
> Hello All,
> I was wondering whether this kind of "editing" can be done in Emacs
> itself using elisp rather than using a shell script or a perl script.
> I have this file containing a few lines.  They are all sql commands.
> <snip>
> call procedure_name( long list of
> argument calls );
> call procedure_name( another long long
> list of arguments that seems
> to be very long indeed);
> call procedure_name( yet another long
> argument list);
> </snip>
> Something like that.  I would like to edit this file so that
> each command is in its own line, like,
> <snip>
> call procedure_name( long ... calls );
> call procedure_name( another ...  indeed);
> call procedure_name( yet ... list);
> </snip>
> Can anyone help me?  Or is this not the right list?  Is there a
> mailing list for Elisp?
> Thanks for your time and help.
> Cheers,
> anna

I wake up each morning to resume battle with      |\      _,,,---,,_        
dragons of the day and have some fun along    ZZz /,`.-'`'    -.  ;-;;,_    
the way, amused to be still alive.  Or do I? ____|,4-  ) )-,_. ,\ (____-'___
--                     '---''(_/--'  `-'\_)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]