Emacs Org-mode:如何在日记周年纪念日中包含属性?
我正在尝试将组织模式条目的“生日”和“名称”属性自动添加到议程中:
* John
:PROPERTIES:
:Name: John
:Birthday: (5 4 1900)
:END:
我找到了一种方法,通过在议程中的正确周年日期添加条目,方法是在属性:
%%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) John
但是,使用此代码,我仍然需要手动输入名称。有没有办法将“名称”属性的值自动添加到所有条目的日记文本中?
编辑1:该示例以前不起作用,现在在生日属性的值周围添加了括号
I am trying to have the "Birthday" and "Name" properties of an Org-mode entry added to the agenda automatically:
* John
:PROPERTIES:
:Name: John
:Birthday: (5 4 1900)
:END:
I found a way to add an entry at the correct anniversary date in the agenda by inserting the following line right after the properties:
%%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) John
However, using this code, I still have to enter the name manually. Is there a way to have the value of the "Name" property added to the diary text automatically for all entries?
EDIT 1: the example did not work before, now added parantheses around the value of the birthday property
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许 https://julien.danjou.info/projects/emacs-packages#org-联系人 是您问题的解决方案。 org-contacts 是 org-mode 的地址簿。
Maybe https://julien.danjou.info/projects/emacs-packages#org-contacts is the solution to your problem. org-contacts is a address book for org-mode.
最好在 Org 邮件列表 询问这个问题,他们非常活跃,而 Carsten Dominik(org-mode 的创建者)通常几乎立即回复此列表中的帖子(顺便说一句,这个 是主要列表电子邮件。
It is probably better to ask this at the Org mailing list, they are very active, and Carsten Dominik (the creator of org-mode) usually answers posts on this list almost immediately (BTW, this is the main list email.
也许你正在走一条需要你写一些 lisp 才能得到你想要的东西的道路。组织模式手册给出了类似的示例,但我猜您想要一种更简单的格式,当它描述日历/议程集成时 http://www.gnu.org/software/emacs/manual/html_node/org/Weekly_002fdaily-agenda.html
我认为如果您想要自定义设置,您还有其他选择:可以使用新型导出或动态块。这可能会突出议程与日记的不同用例。议程似乎更适合日常任务。
Perhaps you a taking a path which requires you to write some lisp to get what you want. The org-mode manual gives an example of something similar, but I'm guessing you wanted a simpler format, when it describes the calendar/agenda integration http://www.gnu.org/software/emacs/manual/html_node/org/Weekly_002fdaily-agenda.html
I would think you have other options if you want a custom setup: either a new type of export or dynamic blocks might be used. This may highlight the different use-case of agenda over the diary. The agenda seems more geared towards day to day tasks.