[PLUG] Emacs: change \n\n to \n

Dale Snell ddsnell at frontier.com
Thu Nov 10 20:17:34 UTC 2016


On Thu, 10 Nov 2016 12:04:34 -0800 (PST), in message
alpine.LNX.2.11.1611101201000.21451 at localhost, Rich Shepard wrote:

>    Large files have a mix of single and double line spacings. I want
> to convert double spaced lines to single space lines but cannot find
> the appropriate regex search and replace syntax. Looking in the emacs
> wiki and other web sites suggested that C-q C-j C-q C-j + would do
> the job, but it does not. Neither does (search) ^$^$ (replace) ^$.
> 
>    I thought this was a simple request but the answer is avoiding me.

M-x replace-string RET C-q C-j C-q C-j RET C-q C-j

works fine for me -- I just tested it.  Am I missing something?

--Dale

-- 
The only substitute for good manners is fast reflexes.



More information about the PLUG mailing list