[Python-Dev] Emacs users: hg-tools-grep (original) (raw)

Georg Brandl g.brandl at gmx.net
Sun Dec 9 09:07:12 CET 2012


Am 08.12.2012 22:51, schrieb Barry Warsaw:

Hark fellow Emacsers. All you unenlightened heathens can stop reading now.

A few years ago, my colleague Jono Lange wrote probably the best little chunk of Emacs lisp ever. M-x bzr-tools-grep lets you easily search a Bazaar repository for a case-sensitive string, providing you with a nice grep buffer which you can scroll through. When you find a code sample you want to look at, C-c C-c visits the file and plops you right at the matching line. You only grep through files under version control, so you get to ignore generated files, and compilation artifacts, etc. Of course, this doesn't help you for working on the Python code base, because Mercurial. I finally whipped up this straight up rip of Jono's code to work with hg. I'm actually embarrassed to put a copyright on this thing, and would happily just donate it to Jono, drop it in Python's Misc directory, or slip it like a lump of coal into the xmas stocking of whoever wants to "maintain" it for the next 20 years. But anyway, it's already proven enormously helpful to me, so here it is.

Thanks, I'll definitely use this!

Georg



More information about the Python-Dev mailing list