I admit, I’m an emacs philistine. I use it as a text editor and when I’ve got a machine or linux VM that I’m going to be using, I’ll set up “cperl-mode” with syntax colouring. I don’t even bother even creating a tags file to be able to bounce around files from the use of a function.method to its definition.
At an interview yesterday, I mentioned this and asked If my interviewers had ever used eclipse for development and their snorts said it all. So, this girded my loins to look at setting up a more productive emacs environment. So, a quick google gives us:
For a top hit in Google, that’s a bit rubbish.
Cperl’s documentation is here: http://www.emacswiki.org/emacs/CPerlMode. Suggestions that jump out at me from this are:
Using perltidy:
“For the emacs editor, first mark a region and then pipe it through perltidy. For example, to format an entire file, select it with C-x h and then pipe it with M-1 M-| and then perltidy. The numeric argument, M-1 causes the output from perltidy to replace the marked text. See “GNU Emacs Manual for more information, http://www.gnu.org/manual/emacs-20.3/html_node/emacs_toc.html
Yuk. That’s clunky.
You can access perldoc from within emacs:
In order to use perldoc from Emacs, type ‘M-x cperl-perldoc’, hit Return and type the keyword to look up.
Not sure what that gains. I usually run perldoc in an xterm!
The comments on this go on to suggest:
Ah, perlnow looks interesting:
I know Piers Cawley has done work on refactoctoring code with emacs, but I can’t find recent references to his work.
Finally, a big shout out to Aquamacs on the Mac. I find this to blend well with the Mac environment. GNU emacs on Linux. Don’t even think about Xemacs.
Still not entirely sure there’s anything in here I’ll make use of! Got any suggestions?
I haven’t used it myself (I keep meaning to) but I’m told that PerlySense (https://metacpan.org/release/Devel-PerlySense) is the dog’s.
Personally, I’m becoming vey happy with Padre as my Perl editor of choice.
I’ve integrated Perl::Critic into Emacs to give continuous static analysis using Flymake mode, you can find the code here:
https://github.com/illusori/emacs-flymake-perlcritic
Along with a fork of Flykmake itself at:
https://github.com/illusori/emacs-flymake
Hope you find those helpful…
Nobody can ever explain to me what ‘Aquamacs’ or any of the other ‘mac-enhanced’ emacs distributions do that GNU emacs does not do ?
Semantic / CEDET is where all the ‘IDE’ work is going in emacs 24. Perl is noticably missing from the list of things they can parse. I don’t know if anyone is working on it.
To my way of thinking, expecting emacs to be an anything out-of-the-box is missing the point. You’re supposed to gently bend it into the shape of the tool you want to use.
Probably the most useful feature of emacs for me when developing across a range of languages / remote machines using a laptop is tramp-mode, which lets me conveniently edit things in-place on foreign systems, using my local emacs installation, so long as I have ssh authentication. I use macros *a lot* to automate edits. I often use emacs to munge and transform text output from other things.
Usually I build and installed via macports, although I sometimes grab a nightly from http://emacsforosx.com/ and run with it for a while if there’s anything new I’m exploring.
[...] emacs as a perl IDE Posted on January 27, 2012 by briang 2012-01-25 by Dave Hodgkinson Related Posts:The 10 rules of the pragmatic programmerEmacs Reference Sheetemacs voting systemNotes [...]
Regards perltidy, have a look at the comment:
Is there a way to get it to work consistently with http://perltidy.sf.net?
on:
http://www.emacswiki.org/emacs/CPerlMode#toc6