emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: MobileOrg pull broken


From: Ian Dunn
Subject: [O] Bug: MobileOrg pull broken
Date: Sun, 31 Jul 2016 13:58:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Emacs  : GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.6) of 
2016-07-22
Package: Org-mode version 8.3.5 (release_8.3.5-1032-g9798da)

    For the past month or so (I don't know exactly when it started), I've been 
having problems with MobileOrg (Android if it helps).  When I'd pull changes 
from my phone to my computer, I'd always get "EXECUTION FAILED" messages, and 
nothing would work.

    I stepped through org-mobile-apply using Edebug and found that the problem 
is with "(eval cmd)" in org-mobile.el, line 889.  It fails with the error 
"(void-variable data)".  I don't know why this is happening, but I've included 
a simple fix for this that passes the `data', `old', and `new' variables as a 
lexical environment to `eval'.  This may not work if `org-mobile-action-alist' 
is modified.

    I tried using "(eval cmd t)", but that didn't work; I got the same 
"void-variable" error.  If someone more familiar with lexical binding can look 
into this, or at least explain why this is happening, I'd appreciate it.

    Thanks!

-- 
Ian Dunn

--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -886,7 +886,11 @@ If BEG and END are given, only do this in that region."
            (condition-case msg
                (org-with-point-at id-pos
                  (progn
-                   (eval cmd)
+                   ;; Using (eval cmd t) doesn't work here, so
+                   ;; specify each required variable by hand.
+                   (eval cmd `((data . ,data)
+                               (old  . ,old)
+                               (new  . ,new)))
                    (unless (member data (list "delete" "archive" 
"archive-sibling" "addheading"))
                      (if (member "FLAGGED" (org-get-tags))
                          (add-to-list 'org-mobile-last-flagged-files



reply via email to

[Prev in Thread] Current Thread [Next in Thread]