The result of that is org-mobile-copy-agenda-files which calls shell-quote-argument while generating command line to produce checksums, ends up with something like
which inevitably fails. I am surprised nobody else with Windows machines noticed that, could there be anything I am doing wrong?
The quick fix would be to redefine the shell-quote-argument to account for colons (added colon in the regex on the last line, see below). After that all my org files get added to checksum.dat and become visible on my Android phone.
I temporarily put this definition to my cygwin-specific initialization file but I feel that there should be more elegant solutions:
(defun shell-quote-argument (argument)
"Quote ARGUMENT for passing as argument to an inferior shell."
(if (or (eq system-type 'ms-dos)
(and (eq system-type 'windows-nt) (w32-shell-dos-semantics)))
;; Quote using double quotes, but escape any existing quotes in
;; the argument with backslashes.
(let ((result "")
(if (or (null (string-match "[^\"]" argument))
(< (match-end 0) (length argument)))
(while (string-match "[\"]" argument start)
(setq end (match-beginning 0)
result (concat result (substring argument start end)
"\\" (substring argument end (1+ end)))
start (1+ end))))
(concat "\"" result (substring argument start) "\""))
(if (equal argument "")
;; Quote everything except POSIX filename characters.
;; This should be safe enough even for really weird shells.
(replace-regexp-in-string "\n" "'\n'"
(replace-regexp-in-string "[^-0-9a-zA-Z_./\n:]" "\\\\\\&" argument)))))
On Sat, Mar 17, 2012 at 10:50 PM, Alexander Vorobiev <address@hidden>
I have many files in the org-mobile-files list. On org-mobile-push all of them are copied to my MobileOrg directory, syncronized via Dropbox to my phone, etc. But the file checksums.dat always has only three lines - for files index.org
, and agendas.org
. The org-mobile-checksum-files variable also has the checksums for those files only. Consequently, MobileOrg for Android only shows one line "Agenda Views" and does not show any of my org files despite having all of them in the same Dropbox directory.