OS X上的emacs 23:mailto links&致电撰写邮件? [英] emacs 23 on OS X: mailto links & calling compose-mail?

查看:235
本文介绍了OS X上的emacs 23:mailto links&致电撰写邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试23.2版Cocoa Emacs构建(OS X 10.6)。有一个
的数量比Cocoa Emacs更麻烦的事情比
好​​极了的Carbon Emacs(基于Emacs 22版本,我相信),所以我b $ b希望人们可能有一些解决方案/想法(不幸的是发布
既不是carbon-emacs列表也没有emacs-dev已经产生了一个有用的
回复,所以我以为我会尝试Stack Overflow第一次):




  • 在Firefox中,我可以将首选项,应用程序,mailto内容
    类型设置为使用Emacs。这用于碳Emacs工作。现在当我
    点击Firefox mailto链接,它将焦点改变为Emacs,但
    实际上并没有做任何事情。



    我的.emacs有以下,我猜这在23中不起作用。建议?




 
(setq browse-url-browser-function
'((^ http:。browse-url-generic)
(^ https:。browse-url-generic)
(^ mailto:lambda(url&rest stuff)(compose-mail
(substring to 7)))
;; (^ mailto:。browse-url-mail);;相同的行为
(^ file:。* \\.html?$。w3m-browse-url))


解决方案

我怀疑emacs没有找到被要求打开的文件。在命令行上尝试一些事情,看看会发生什么:



emacs mailto:example@example.com / p>

只能打开emacs并盯着你。



emacs --eval' (browse-urlmailto:user@example.com)'



应该处理URL。



如果这一切都检出,那么当firefox调用它时(包括一个脚本,除非FF让你用一个%s替换来指定命令行),那么你需要包装它。或者,您可能可以通过设置TRAMP来了解邮件,以了解mailto:url,但这似乎有点复杂。



(现在我知道什么寻找:您可能会发现 EmacsWiki:MailtoHandler 有帮助。)


I'm trying the 23.2 release Cocoa Emacs build (OS X 10.6). There's a number of things that are more annoying about Cocoa Emacs than the terrific Carbon Emacs (based on an Emacs 22 build, I believe), so I hoped folks might have some solutions/thoughts (unfortunately posting on neither the carbon-emacs list nor emacs-dev has produced a useful reply, so I thought I'd try Stack Overflow for the first time):

  • In Firefox, I can set the Preferences, Applications, mailto content type to "Use Emacs". This used to work in Carbon Emacs. Now when I click on a Firefox mailto link, it changes focus to Emacs but doesn't actually do anything.

    My .emacs has the following, which I guess doesn't work in 23. Suggestions?

    (setq browse-url-browser-function
          '(("^http:" . browse-url-generic)
            ("^https:" . browse-url-generic)
            ("^mailto:" lambda (url &rest stuff) (compose-mail 
                                                  (substring to 7)))
            ;; ("^mailto:"  . browse-url-mail) ;; same behavior
            ("^file:.*\\.html?$" . w3m-browse-url))
    )

解决方案

I suspect that emacs is failing to find the 'file' it's being told to open. Try a couple things on the command line to see what happens:

emacs mailto:example@example.com

should just open emacs and stare at you blankly.

emacs --eval '(browse-url "mailto:user@example.com")'

should handle the url.

If that all checks out, then you need to wrap things when firefox makes it's invocation (with a script unless FF lets you specify the command line using a %s replacement). Alternatively, you might be able to get things working by setting TRAMP up to understand a mailto: url, but that seems a bit convoluted.

(now that I know what to look for: you might find the EmacsWiki:MailtoHandler helpful.)

这篇关于OS X上的emacs 23:mailto links&致电撰写邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆