Created
January 19, 2010 10:23
-
-
Save chaitanyagupta/280828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun squash-log-newlines () | |
"Squash wrapped log lines back to their original single line format." | |
(interactive) | |
(end-of-line) | |
(let ((search-str "[2010-01") | |
(start-marker (make-marker)) | |
(end-marker (make-marker))) | |
(set-marker start-marker (point)) | |
(search-forward search-str) | |
(set-marker end-marker (- (point) (1+ (length search-str)))) | |
(replace-string "\n" " " nil start-marker end-marker)) | |
(next-line) | |
(beginning-of-line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment