且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

挂钩一些Emacs事件来改善组织模式/ MobileOrg集成

更新时间:2022-10-16 12:10:55

我没有在这台机器上安装Emacs ,但这是你可以做的:


  1. http://www.gnu.org/s/emacs/manual/html_node/elisp/Standard-Hooks.html - 寻找 after-save-hook

  2. 启动事情将转到您的 .emacs 文件 - 如果您在此文件末尾调用 org-mobile-pull ,则每次打开Emacs

  3. 检查这个SO答案以进行定期运行的一些功能:如何定期在emacs中运行任务?

希望这有帮助。


I've recently started using MobileOrg (through Dropbox) to be able to manage my org-mode TODO lists while I'm away from my computer.

It's generally great, but the syncing back and forth has a few steps, so I'd like to try and simplify it a bit by automating the steps on the PC side.

Anyway, here are the two things I'd like to do:

  1. Run org-mobile-push every time a file is saved, after the save completes. The only thing I use emacs for is org-mode, so this should be fine.
  2. Run org-mobile-pull on emacs startup.
  3. Run org-mobile-pull periodically, say every hour or so.

Thanks.

I don't have Emacs installed on this machine, but here's what you can do:

  1. http://www.gnu.org/s/emacs/manual/html_node/elisp/Standard-Hooks.html - look for after-save-hook
  2. Startup things go to your .emacs file - if you put the call to org-mobile-pull at the end of this file, you will have it run every time you open Emacs
  3. Check this SO answer for a periodical run of some function: How to periodically run a task within emacs?

Hope this helps.