1

I like to know how I can run cpan to install modules using emacs? I often do that on command line now.

Update: I had asked this because I get the message "warning: extra args ignored after '-e'" when I use M-x shell to run it. I still need help.

4 Answers 4

5

Have you tried M-x shell?

5

As far as I know, there is no tight integration of CPAN into Emacs, so going through shell will probably be your best bet. If you use w3m-el, you may also find this useful:

(add-to-list 'w3m-search-engine-alist '("cpan" "http://search.cpan.org/search?query=%s&n=100"))

From within any w3m buffer, I use this and a few keystrokes (C-u S RET cpan RET <search-term>) to find CPAN modules.

1
  • +1 for this. didn't know about w3m-search-engine Too used to webjump I guess.
    – seth
    Jul 24, 2009 at 16:04
3
M-!

aka

M-x shell-command
1

I just ran into the same thing and google found this workaround (from http://www.mail-archive.com/[email protected]/msg04015.html) :

cmd /c "foo.bat arg1 arg2 arg3"

This seems like an awkward hack, but it works.

2
  • 1
    How do you apply this in emacs?
    – aartist
    Nov 18, 2009 at 13:28
  • After reading your question more thoroughly this may not apply. Using M-x eshell I see: SomeCommand.bat abc warning: extra args ignored after 'SomeCommand.bat' cmd /c "SomeCommand.bat abc" expected output Using M-x shell I see: SomeCommand.bat abc expected output You said you are using M-x shell and I don't see the same issue you do, so maybe the workaround does not apply. Nov 19, 2009 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.