From: Jim Weirich Date: 2004-11-14T00:08:40+09:00 Subject: For Emacs Users ... (Was: Trivial trick for looking at complex code) On Friday 12 November 2004 06:30 pm, Hal Fulton wrote: > You'd be surprised how helpful this is: > > grep -E "^ *(class|module|attr|def)" file.rb Oh, excellent! What a great way to outline your ruby code. > OK, it's not rocket science, but I felt like sharing it. You can also do this in emacs ... M-X grep RET grep -n -RE "^ *(class|module|attr|def)" lib RET And you will get a grep buffer with the tagged outline. Just middle mouse click on any line in the grep buffer and emacs will automatically go to that file and line number. Great for browsing code. Thanks Hal. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)