Emacs Org 模式提要不显示来自 gmail Atom 提要的电子邮件正文
我已使用以下代码成功将我的 Gmail Atom 提要提取到 org 文件中
(setq org-feed-alist
'(("Mail Entries"
"http://mail.google.com/mail/feed/atom"
"~/org/feeds.org" "Mail Entries"
:parse-entry org-feed-parse-atom-entry
:parse-feed org-feed-parse-atom-feed
:item-full-text
:template "* TODO %title\n %summary\n"
)))
典型的 Gmail Atom 提要如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<title>Gmail - Inbox for [email protected]</title>
<tagline>New messages in your Gmail Inbox</tagline>
<fullcount>1</fullcount>
<link rel="alternate" href="http://mail.google.com/mail" type="text/html" />
<modified>2011-02-22T06:38:03Z</modified>
<entry>
<title>RE: URGENT URGENT</title>
<summary>Do this now or the world will end</summary>
<link rel="alternate" href="http://mail.google.com/[email protected]&message_id=654646578943541&view=conv&extsrc=atom" type="text/html" />
<modified>2011-02-21T21:30:18Z</modified>
<issued>2011-02-21T21:30:18Z</issued>
<id>tag:gmail.google.com,2003:104521846321321</id>
<author>
<name>me</name>
<email>[email protected]</email>
</author>
</entry>
当我点击 Cc Cx g 并输入我的凭据时,我会在 .org 文件中得到此信息,
** TODO RE: URGENT URGENT
%summary
而不是来自Atom feed 应该是“立即执行此操作,否则世界将终结”
我已阅读 org-feed.el 中的文档,这一行让我相信我可以使用 % 在我的模板中包含摘要 XML 项摘要
。
提要项目中的任何字段都可以插入到模板中
%name
,例如%title
、%description
、%pubDate
等。
我错了吗?有没有办法将摘要插入到我的模板中(最好不修改 org-feed.el)
任何帮助者都会受到感谢和彩虹的沐浴
I have successfully pulled my Gmail Atom feed into a org file with the following code
(setq org-feed-alist
'(("Mail Entries"
"http://mail.google.com/mail/feed/atom"
"~/org/feeds.org" "Mail Entries"
:parse-entry org-feed-parse-atom-entry
:parse-feed org-feed-parse-atom-feed
:item-full-text
:template "* TODO %title\n %summary\n"
)))
A typical Gmail Atom feed looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<title>Gmail - Inbox for [email protected]</title>
<tagline>New messages in your Gmail Inbox</tagline>
<fullcount>1</fullcount>
<link rel="alternate" href="http://mail.google.com/mail" type="text/html" />
<modified>2011-02-22T06:38:03Z</modified>
<entry>
<title>RE: URGENT URGENT</title>
<summary>Do this now or the world will end</summary>
<link rel="alternate" href="http://mail.google.com/[email protected]&message_id=654646578943541&view=conv&extsrc=atom" type="text/html" />
<modified>2011-02-21T21:30:18Z</modified>
<issued>2011-02-21T21:30:18Z</issued>
<id>tag:gmail.google.com,2003:104521846321321</id>
<author>
<name>me</name>
<email>[email protected]</email>
</author>
</entry>
When I hit C-c C-x g and enter my credentials, I get this in my .org file
** TODO RE: URGENT URGENT
%summary
Not the actual summary from the Atom feed which should read "Do this now or the world will end"
I have read the documentation in org-feed.el, and this line lead me to believe I can just include the summary XML item in my template with %summary
.
Any fields from the feed item can be interpolated into the template with
%name
, for example%title
,%description
,%pubDate
etc.
Am I mistaken? Is there a way to insert the summary into my template (preferably without modifying org-feed.el)
Any helpers will be showered in thanks and rainbows
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在 org-feed-parse-atom-entry 上。它不提供对所有 xml 元素的访问。
我成功地通过以下建议启用了摘要:
此外,:item-full-text 不是 org-feed-alist 的正确关键字。它是传递给各个函数的条目 p-list 中使用的键。
The problem is with org-feed-parse-atom-entry. It doesn't provide access to all of the xml elements.
I was successful in enabling the summary with this bit of advice:
Also, :item-full-text is not a proper keyword for org-feed-alist. It is the key used in the entry p-list that is passed to the various functions.