From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Dunn Subject: Bug: MobileOrg pull broken Date: Sun, 31 Jul 2016 13:58:00 -0400 Message-ID: <87invlwuzb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTuzz-0004Cr-Vy for emacs-orgmode@gnu.org; Sun, 31 Jul 2016 13:58:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTuzz-0003Ul-46 for emacs-orgmode@gnu.org; Sun, 31 Jul 2016 13:58:03 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTuzz-0003Ua-18 for emacs-orgmode@gnu.org; Sun, 31 Jul 2016 13:58:03 -0400 Received: from [2604:6000:1010:176:da4d:3352:bae5:f50e] (port=44042 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1bTuzx-0004AE-Fv for emacs-orgmode@gnu.org; Sun, 31 Jul 2016 13:58:01 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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