Emacs Org 模式移動 (org-mobile-pull) 問題

Emacs Org 模式移動 (org-mobile-pull) 問題

我正在嘗試透過 iPhone 應用程式 MobileOrg 在 Mac 和 iPhone 上同步 .org 檔案。檔案運作正常,直到執行 org-mobile-pull 命令嘗試將從 iPhone 發送到我的暫存資料夾(在 中定義org-mobile-directory)的檔案拉回原始檔案(名為220212.org)。

我輸入C-c C-x RET g,相當於M-x org-mobile-pull,並收到以下錯誤:Wrong type argument: stringp, nil

運行 org-mobile-pull 之前 mobileorg.org 的內容(包含在手機上執行的更新的檔案):

 * F(edit:todo) [[olp:220212.org:s/stretch neck right][stretch neck right]]
 ** Old value
 TODO
 ** New value
 DONE
 ** End of edit

運行 org-mobile-pull 並看到錯誤後:空

我是調試 lisp 代碼或 emacs 的新手,但我嘗試在org-mobile-pullemacs 中將“debug-on-error”和“debug-on-entry”設為 true。弄清楚函數的確切位置有點困難,但它似乎在前幾個命令中。透過在調試器中反覆按 d,它不斷遞歸地輸入函數調用,我有點迷失了。可能會嘗試掌握調試器並進一步調試。

我的 .init.el 包含org-directoryorg-mobile-inbox-for-pullorg-mobile-directoryorg-mobile-filesorg-mobile-force-id-on-agenda-items所有設置,在我看來,是適當的。

有誰知道是什麼原因造成的?由於此錯誤,mobileorg.org 中的變更不會同步回原始 220212.org 檔案。

答案1

解決了這個問題並在這裡發布了完整的帖子:https://github.com/MobileOrg/mobileorg/issues/285

概括:

將收件匣檔案與 mobileorg.org 檔案混淆。了解差異,然後將 org-mobile-inbox-for-pull 指向 org-directory 中的文件,而不是 org-mobile-directory 中的 mobileorg.org。

具體來說,將 ~/.emacs.d/init.el 從

(setq org-directory "[redacted]/repo/typed/")
(setq org-mobile-inbox-for-pull "[redacted]/repo/typed/mobile/mobileorg.org")
(setq org-mobile-directory "[redacted]/repo/typed/mobile")
(setq org-mobile-files (quote ("[redacted]/repo/typed/220212.org")))

(setq org-directory "[redacted]/repo/typed/")
(setq org-mobile-inbox-for-pull "[redacted]/repo/typed/inbox-for-pull.org")
(setq org-mobile-directory "[redacted]/repo/typed/mobile")
(setq org-mobile-files (quote ("[redacted]/repo/typed/220212.org")))

相關內容