I'm currently working on a file that has a lot of duplicate lines splattered across the file and I'm trying to remove those duplicates. I tried using replace-regexp with \(.+^J\)\(\(.+^J\)+?\)\1+ => \1\2 which is working okay. Then I realised that there'll be some lines not caught by that so I captured it in a macro. But now I'm stuck running that several times and not knowing if/when it'll ever be done.
I get the feeling I should be able to use some sort of function to do this but I'm not entirely sure how. What should I be doing instead?
mark-whole-bufferbefore you run it to make sure it covers the whole buffer. I have never seenreplace-regexpmiss something it should have replaced, if that is really happening it's a bug.