all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: MobileOrg pull broken
@ 2016-07-31 17:58 Ian Dunn
  2016-08-07 22:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Dunn @ 2016-07-31 17:58 UTC (permalink / raw)
  To: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-08  7:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31 17:58 Bug: MobileOrg pull broken Ian Dunn
2016-08-07 22:15 ` Nicolas Goaziou
2016-08-08  1:37   ` Ian Dunn
2016-08-08  7:20     ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.