changelog shortlog tags changeset files revisions annotate raw

test-jig-funcs.el

changeset 66: 5b737eefe5ea
author: kim.vanwyk
date: Wed Nov 10 15:19:03 2010 +0200 (18 months ago)
permissions: -rw-r--r--
description: Adding CSharp Mode and Google Weather
1(defun clean-delphi-ird-log ()
2"Clean up a delphi IRD log, removing front matter and repalcing newlines, tabs and spaces"
3(interactive)
4(save-excursion)
5;; Remove first 7 lines
6(setq kill-whole-line t)
7(beginning-of-buffer)
8(kill-line 7)
9;; Move to the point to delete from
10(end-of-buffer)
11(forward-line -1)
12(forward-char 44)
13;; Remove front matter
14(delete-extract-rectangle (point-min) (point))
15(beginning-of-buffer)
16;; Delete all newline chars
17(while (search-forward "
18" nil t)
19 (replace-match "" nil t))
20;; Replace [0A], [0D], [20] and [09] as appropriate
21(beginning-of-buffer)
22(while (search-forward "[0A]" nil t)
23 (replace-match "" nil t))
24(beginning-of-buffer)
25(while (search-forward "[0D]" nil t)
26 (replace-match "
27" nil t))
28(beginning-of-buffer)
29(while (search-forward "[20]" nil t)
30 (replace-match " " nil t))
31(beginning-of-buffer)
32(while (search-forward "[09]" nil t)
33 (replace-match " " nil t))
34(beginning-of-buffer)
35(while (search-forward "[00]" nil t)
36 (replace-match "" nil t))
37)
38
39(provide 'test-jig-funcs)