From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dror Atariah Subject: Re: Unable to push to org-mobile Date: Sat, 14 Dec 2013 16:40:39 +0100 Message-ID: References: <13008CFE-91B9-4221-9DBB-96157A4A2FC6@gmail.com> Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrrKj-0002Dl-Gx for Emacs-orgmode@gnu.org; Sat, 14 Dec 2013 10:40:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrrKe-00084q-0L for Emacs-orgmode@gnu.org; Sat, 14 Dec 2013 10:40:49 -0500 Received: from mail-ee0-x233.google.com ([2a00:1450:4013:c00::233]:58695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrrKd-00084k-Oq for Emacs-orgmode@gnu.org; Sat, 14 Dec 2013 10:40:43 -0500 Received: by mail-ee0-f51.google.com with SMTP id b15so1395846eek.24 for ; Sat, 14 Dec 2013 07:40:42 -0800 (PST) Received: from [192.168.0.100] (brln-4db9086b.pool.mediaWays.net. [77.185.8.107]) by mx.google.com with ESMTPSA id m1sm19755396eeg.0.2013.12.14.07.40.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Dec 2013 07:40:41 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs-orgmode@gnu.org On Dec 13, 2013, at 23:08 PM, Nick Dokos wrote: > Dror Atariah writes: >=20 >> Managed to get [backtrace] output...=20 >>=20 >> You can find it here: https://gist.github.com/drorata/7950857 >>=20 >> I could not find my way in this output... :( >>=20 >=20 > If you look at the top of the backtrace it shows this: >=20 > ,---- > | Debugger entered--Lisp error: (wrong-type-argument sequencep = :grouptags) > | mapconcat(identity ("PRIVATE" "{" "WORK" :grouptags = "WORK@mittagseminar" "WORK@open_questions" "WORK@diss" "WORK@CV" "}" "{" = "IT" :grouptags "IT@emacs" "IT@git" "IT@TeX" "}" "{" "PROG" :grouptags = "PROG@mathematica" "PROG@cgal" "}" "}" "4freeTime" "bms_friday" "emacs" = "interesting_questions" "mittagseminar" "Mittagsseminar" "NOTE" = "private" "results" "work" "Yvinec" "Ziegler") " ") > | (insert "#+TAGS: " (mapconcat (quote identity) tags " ") "\n") > | ... > | org-mobile-create-index-file() > `---- >=20 > The mapconcat line can be evaluated on its own - it does not depend on > anything else. If you cut and paste it into your *scratch* buffer and > modify it slightly like this: >=20 > --8<---------------cut here---------------start------------->8--- > (mapconcat 'identity '("PRIVATE" "{" "WORK" :grouptags = "WORK@mittagseminar" "WORK@open_questions" "WORK@diss" "WORK@CV" "}" "{" = "IT" :grouptags "IT@emacs" "IT@git" "IT@TeX" "}" "{" "PROG" :grouptags = "PROG@mathematica" "PROG@cgal" "}" "}" "4freeTime" "bms_friday" "emacs" = "interesting_questions" "mittagseminar" "Mittagsseminar" "NOTE" = "private" "results" "work" "Yvinec" "Ziegler") " ") > --8<---------------cut here---------------end--------------->8--- >=20 > and evaluate it with C-j, you get the exact error. Now look in > org-mobile-create-index-file for the call >=20 >=20 > (insert "#+TAGS: " (mapconcat 'identity tags " ") "\n") >=20 > You'll find it on line 470 (at least in the version I'm using). > Before this line there is this code: >=20 > ... > (setq def-tags (mapcar > (lambda (x) > (cond ((null x) nil) > ((stringp x) x) > ((eq (car x) :startgroup) "{") > ((eq (car x) :endgroup) "}") > ((eq (car x) :newline) nil) > ((listp x) (car x)))) > def-tags)) > (setq def-tags (delq nil def-tags)) > (setq tags (org-delete-all def-tags tags)) > (setq tags (sort tags (lambda (a b) (string< (downcase a) = (downcase b))))) > (setq tags (append def-tags tags nil)) > (insert "#+TAGS: " (mapconcat 'identity tags " ") "\n") > ... >=20 > You'll notice that :startgroup is replaced by { , :endgroup is > replaced by } and :newline is deleted - but there is no mention of > :grouptags which leads me to suspect that there should be an extra > line in there, perhaps >=20 > ((eq (car x) :grouptags) nil) >=20 > Maybe you can try it - better yet, maybe somebody who has some idea of > how org-mobile works should take a look. I note that if I delete the > :grouptags instances in the mapconcat call above, it completes without > error. Bingo! Adding this line allowed me to complete org-mobile-push = successfully! Amazing. I have three closing questions: 1. What made you look into lines #460-464? Now when you pointed, it is = somehow straightforward to check line #470, but there seems to be no = indication regarding the broken code. 2. What's next? I believe this is a bug... How can I report it? 3. Finally, in the meanwhile, till the bug-fix is out, what is the best = practice to maintain this patch locally? Thanks a lot for your hand!!!! It was great having it! Dror >=20 > Nick