R
rusi
Well it seems that we are considerably closer to a solution to the GG double-spaced crap problem.
Just wondering if someone can suggest a cleanup of the regexp part
Currently I have (elisp)
(defun clean-gg ()
(interactive)
1 (replace-regexp "^> *\n> *\n> *$" "-=\=-" nil 0 (point-max))
2 (flush-lines "> *$" 0 (point-max))
3 (replace-regexp "-=\=-" "" nil 0 (point-max)))
Which I spell out as:
1. Replace triplets of empty lines of the form
with only 1 (because this is an actual blank line and not a GG-crap line)
However then it gets mixed up with the others so put some strange string:
"-=\=-" as replacement
2. Remove the purelines
3. Remove the strange string.
Not very robust since the strange string could occur in the text.
So what are the more proper regexp solution(s)?
Just wondering if someone can suggest a cleanup of the regexp part
Currently I have (elisp)
(defun clean-gg ()
(interactive)
1 (replace-regexp "^> *\n> *\n> *$" "-=\=-" nil 0 (point-max))
2 (flush-lines "> *$" 0 (point-max))
3 (replace-regexp "-=\=-" "" nil 0 (point-max)))
Which I spell out as:
1. Replace triplets of empty lines of the form
with only 1 (because this is an actual blank line and not a GG-crap line)
However then it gets mixed up with the others so put some strange string:
"-=\=-" as replacement
2. Remove the purelines
3. Remove the strange string.
Not very robust since the strange string could occur in the text.
So what are the more proper regexp solution(s)?