将 Org-Mode 与 Gnome 3 日历结合使用
Gnome 3 有一个漂亮的日历面板,可以从菜单中下拉酒吧,并为您即将到来的约会提供一个空间。默认情况下,此约会管理器从 Evolution Mail 中的日历中读取。我很好奇是否可以让它与 Org-Mode 一起工作。我知道 Evolution 可以导入 .ics 文件,而 Org-Mode 可以写入它们,所以这是一个开始。有没有人想过如何 (a) 让 Gnome 3 日历直接与 Org-Mode 一起工作,或者 (b) 在 Org-Mode 和 Evolution Mail 的日历之间建立有效的同步,以便将其反映在Gnome 3 日历面板?
Gnome 3 has a beautiful calendar panel that drops down from the menu bar, and includes a space for your upcoming appointments. By default this appointment manager reads from the calendar in Evolution Mail. I was curious as to whether it's possible to get it working with Org-Mode. I know Evolution can import .ics files and Org-Mode can write them, so that's a start. Does anyone have thoughts as to how you might (a) get the Gnome 3 Calendar working directly with Org-Mode, or (b) set up an efficient sync between Org-Mode and Evolution Mail's calendar, such that it would be reflected in the Gnome 3 Calendar panel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我假设您已经使用
org-agenda
。您正在寻找的是 org-write-agenda 来获取导出的 ics 文件。我会用您自己的自定义sync-cal
函数包装该函数。sync-call
应该继续编写议程/tmp
,然后您应该发出一些 shell 命令(请参阅start-process
)以与 Evolution 同步(如何做到这一点,我不知道)。现在,您可能想将sync-cal
函数挂接到某些 文件保存函数并根据文件名运行它。Hacky,但如果我使用 Gnome,我就会这样做。
I assume you already use the
org-agenda
. What you are looking for isorg-write-agenda
to get the exported ics file. I'd wrap that function with your own customsync-cal
function.sync-call
should go ahead write the agenda/tmp
and then you should issue some shell commands (seestart-process
) to sync with Evolution (how to do that, I do not know). Now, you maybe want to hook yoursync-cal
function to some file save functions and run it depending on the file name.Hacky, but that's how I'd do it if I'd use Gnome.
当天晚些时候,我想到了一个想法——有点迂回,但可行——就是浏览谷歌日历。 现有的组织模式脚本可用于写入 Google 日历,以及标准过程用于从 Google 日历中阅读的 Evolution Mail。因此,如果您不介意通过第三方或让日历更新依赖于互联网访问,那么应该可以通过 Google 进行同步。这不是一个优雅的解决方案,但至少有很好的文档记录。
An idea that occurred to me later in the day—a bit circuitous, but possible—is to go through Google Calendar. There are existing Org-Mode scripts for writing to Google Calendar, and a standard procedure in Evolution Mail for reading from Google Calendar. So if you don't mind going through a third party or having calendar updates depend on Internet access, it should be possible to sync through Google. It's not an elegant solution, but it's at least well documented.
对于 Evolution 和专用 org 文件之间的同步(目前仅限单向),这里有一个 Python 脚本: 组织议程演变。
(免责声明:(1)我是作者,(2)截至 2022 年 8 月,该工具缺乏配置系统,因此现在您可能需要调整源代码中的一些顶级常量,以使其适用于您的组织- 模式设置。)
For synchronisation between Evolution and a dedicated org file (one-way only, for now), here's a Python script: org-agenda-evolution.
(Disclaimer: (1) I am the author, (2) as of 2022-08, the tool lacks a configuration system, so right now you may have to tweak some top-level constants in the source to make it work for your org-mode setup.)