[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Unable to push to org-mobile
From: |
Dror Atariah |
Subject: |
Re: [O] Unable to push to org-mobile |
Date: |
Sat, 14 Dec 2013 16:40:39 +0100 |
On Dec 13, 2013, at 23:08 PM, Nick Dokos wrote:
> Dror Atariah <address@hidden> writes:
>
>> Managed to get [backtrace] output...
>>
>> You can find it here: https://gist.github.com/drorata/7950857
>>
>> I could not find my way in this output... :(
>>
>
> If you look at the top of the backtrace it shows this:
>
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument sequencep :grouptags)
> | mapconcat(identity ("PRIVATE" "{" "WORK" :grouptags "address@hidden"
> "address@hidden" "address@hidden" "address@hidden" "}" "{" "IT" :grouptags
> "address@hidden" "address@hidden" "address@hidden" "}" "{" "PROG" :grouptags
> "address@hidden" "address@hidden" "}" "}" "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()
> `----
>
> 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:
>
> --8<---------------cut here---------------start------------->8---
> (mapconcat 'identity '("PRIVATE" "{" "WORK" :grouptags "address@hidden"
> "address@hidden" "address@hidden" "address@hidden" "}" "{" "IT" :grouptags
> "address@hidden" "address@hidden" "address@hidden" "}" "{" "PROG" :grouptags
> "address@hidden" "address@hidden" "}" "}" "4freeTime" "bms_friday" "emacs"
> "interesting_questions" "mittagseminar" "Mittagsseminar" "NOTE" "private"
> "results" "work" "Yvinec" "Ziegler") " ")
> --8<---------------cut here---------------end--------------->8---
>
> and evaluate it with C-j, you get the exact error. Now look in
> org-mobile-create-index-file for the call
>
>
> (insert "#+TAGS: " (mapconcat 'identity tags " ") "\n")
>
> You'll find it on line 470 (at least in the version I'm using).
> Before this line there is this code:
>
> ...
> (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")
> ...
>
> 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
>
> ((eq (car x) :grouptags) nil)
>
> 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
>
> Nick
- Re: [O] Unable to push to org-mobile,
Dror Atariah <=