使用Emacs在光标下的链接上调用外部程序

时间:2016-09-20 11:35:40

标签: emacs

我使用elfeed来阅读RSS。 在每个RSS中都有一个指向torrent文件的http链接。 我想调用一个外部程序(aria2c)来下载该torrent链接,假设Emacs中没有这样的工具。

如何编写一个小函数来执行此操作?

1 个答案:

答案 0 :(得分:2)

这是一个简单的解决方案:

(defun open-with-ariac2()
 (interactive)
 (shell-command
     (format (concat "aria2c " (browse-url-url-at-point)))))