我如何在emacs中运行'cpan'?

时间:2021-11-03 16:21:14

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

我想知道如何使用emacs运行cpan来安装模块?我经常在命令行上这样做。

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.

更新:我问过这个问题是因为当我使用M-x shell运行它时,我收到消息“警告:在'-e'之后忽略了额外的args”。我还需要帮助。

4 个解决方案

#1


Have you tried M-x shell?

你试过M-x shell吗?

#2


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:

据我所知,CPAN没有与Emacs紧密集成,因此通过shell可能是你最好的选择。如果你使用w3m-el,你可能会发现这很有用:

(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.

在任何w3m缓冲区中,我使用它和几个键击(C-u S RET cpan RET )来查找CPAN模块。

#3


M-!

aka

M-x shell-command

#4


I just ran into the same thing and google found this workaround (from http://www.mail-archive.com/help-gnu-emacs@gnu.org/msg04015.html) :

我刚刚遇到同样的事情,谷歌发现了这个解决方法(来自http://www.mail-archive.com/help-gnu-emacs@gnu.org/msg04015.html):

cmd /c "foo.bat arg1 arg2 arg3"

This seems like an awkward hack, but it works.

这似乎是一个尴尬的黑客,但它的工作原理。

#1


Have you tried M-x shell?

你试过M-x shell吗?

#2


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:

据我所知,CPAN没有与Emacs紧密集成,因此通过shell可能是你最好的选择。如果你使用w3m-el,你可能会发现这很有用:

(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.

在任何w3m缓冲区中,我使用它和几个键击(C-u S RET cpan RET )来查找CPAN模块。

#3


M-!

aka

M-x shell-command

#4


I just ran into the same thing and google found this workaround (from http://www.mail-archive.com/help-gnu-emacs@gnu.org/msg04015.html) :

我刚刚遇到同样的事情,谷歌发现了这个解决方法(来自http://www.mail-archive.com/help-gnu-emacs@gnu.org/msg04015.html):

cmd /c "foo.bat arg1 arg2 arg3"

This seems like an awkward hack, but it works.

这似乎是一个尴尬的黑客,但它的工作原理。