tags:

views:

118

answers:

4

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.

+5  A: 

Have you tried M-x shell?

Erik
+3  A: 
M-!

aka

M-x shell-command
Trey Jackson
+5  A: 

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.

hillu
+1 for this. didn't know about `w3m-search-engine` Too used to `webjump` I guess.
seth
+1  A: 

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.

Brandon Leiran
How do you apply this in emacs?
aartist
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 outputUsing M-x shell I see: SomeCommand.bat abc expected outputYou said you are using M-x shell and I don't see the same issue you do, so maybe the workaround does not apply.
Brandon Leiran