Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl IDE and New Foreign APIs

by blakem (Monsignor)
on Sep 10, 2005 at 12:00 UTC ( #490880=note: print w/ replies, xml ) Need Help??


in reply to Perl IDE and New Foreign APIs

We use a highly customized emacs at work... A few of the features we've added are:

- Jump to perl-thing-at-point, whether its a method, module, constant, subroutine, or filename
- Show the inheritance hierarchy of this module, or the one under point
- Add a use line for the class under point
- Deparse a chunk of highlighted perl, adding parens to clarify precidence
- Jump from code to test (and vice versa) in one button
- Run the unit test
- Update the test count
- See the current cvs diff for this file or sandbox
- Navigate previous cvs changes for this file
- Show the entire CVS checkin that added a particular line
- Apply/Revert a hunk from a cvs diff file
- Show CVS annotation or log comment for current line
- Jump from a CVS diff file directly to the line in the code
- Insert a random MAC address (for writing unit tests)
- Insert a source filter around the current block so only a portion of the unit test is run, so you can focus in on a particular test thats failing
- Toggle formatting of lists or hashes that span more than 80 columns
- find all occurances of a string in our code base
- show all methods named X
- find all callers of method X
- Jump to the SUPER method of the one you're overriding
- Jump to the superclass of the current module
- run 'make' with various useful targets
- Display the apache error logs in a way that makes them easy to read and jump quickly to source of the error
- make sure the current perl file compiles cleanly
- pull up a perldoc on whatevers under the point
- Insert various useful debugging lines temporarily, i.e. Carp
- toggle pairs of single quotes to double quotes and vice versa
- Fold unnecessarily long copyright chunks into one line
- Tab complete module names based on the .pm files in the filesystem
- Toggle between prefix and postfix versions of if,foreach,while

And thats just a quick list I came up with by scanning through our config file... I'm sure there's lots of other good stuff in there that I missed. Its gotten to the point where our die-hard vi users are beginning to transition to emacs so they can develop faster. ;-)

-Blake


Comment on Re: Perl IDE and New Foreign APIs
Re^2: Perl IDE and New Foreign APIs
by t'mo (Pilgrim) on Sep 12, 2005 at 21:29 UTC

    Pretty cool...I've been using Eclipse (on Java) recently, and it doesn't do a whole lot more than that, unless you count the "refactoring" tools or plugins you can add.

    So, how do you customize emacs like that? A bunch of lispy-config files? And how long did it take to get that kind of usefulness built up? It would come in very handy for some of my personal (Perl) projects, but I don't know if I have time to learn "yet another config language"...

      I would really like refactoring tools for perl... but the language makes it very difficult (some would say impossible) to get right.

      I'm working at an extreme programming shop, doing pair programming in perl. Most of the nifty emacs ideas came about while pairing. i.e. your pair says, "Lets go see how 'munge_data' is implemented." If it takes thirty seconds to get the method on the screen, it really breaks up the flow of the session, and you lose focus on what you we're doing in the first place....

      So, to answer your question, I've been at my current job for a couple of years now, and really only got into the highly-customized emacs craze within the last year or so... The configuration consists of a bunch of lisp functions, and some small perl utilities that get invoked from the lisp to handle the really tricky parts.

      -Blake

Re^2: Perl IDE and New Foreign APIs
by loris (Hermit) on Sep 16, 2005 at 12:25 UTC

    Any chance of you posting your .emacs and any extra lisp that goes with it?

    loris

      I really would like to, but the code is technically owned by my employer. I doubt if there would be much push-back if I tried to get permission to release the code, but I haven't done that yet. The configuration is also rather customized for our code base, and would need to be massaged quite a bit to make it totally functional on another project.

      -Blake

        I can appreciate the fact that it might not work out-of-the-box for someone else (for instance, I use ClearCase at work, rather that CVS), but I would still be interested in seeing an example of how to seriously intergrate emacs into the development/build environment.

        loris

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://490880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2014-08-22 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls