Useful Emacs commands (for cleaning up WowchatLog.txt)

M-x flush-lines REGEXP
Delete each line that contains a match for REGEXP, operating on
the text after point. In Transient Mark mode, if the region is
active, the command operates on the region instead.

e.g. M-x flush-lines \[2\. Trade
removes lines logged from Trade channel

M-x keep-lines REGEXP
Delete each line that _does not_ contain a match for REGEXP,
operating on the text after point. In Transient Mark mode, if the
region is active, the command operates on the region instead.

e.g. M-x keep-lines \[Guild\|Officer
keeps only lines from Officer chat and from Guild chat

Leave a Reply