mobileorg-android+noreply-APn2wQcDVDSTkozuWdX9C6saSzDwuTk-Wk0tPN-/
2013-08-28 19:03:36 UTC
I am trying to set up mobileorg over SSH. In order to maintain security I made a fresh low-privilege user on my (amd64 ubuntu) machine to hold the mobileorg files. Here are my env variables:
(setq org-mobile-directory "/home/user/mobileorg")
(setq org-directory "/home/user/mobileorg")
(setq org-mobile-inbox-for-pull "/home/user/mobileorg/inbox.org")
(permissions on this folder are all okay and everything writes properly)
However, if I do org-mobile-push running emacs23 as my regular user, it creates checksums.dat in the regular user home, instead of in the desired folder, and the hashes from the mobileorg directory are not present.
I tried setting this variable as well to no effect:
(setq org-mobile-checksum-files "/home/user/mobileorg/checksums.dat")
I also tried setting up this function I found to fix the directory problem (http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-mobile.el;hb=HEAD), but my elisp is not good; I couldn't make it work:
(defun org-mobile-write-checksums ()
"Create checksums for all files in `org-mobile-directory'.
The table of checksums is written to the file mobile-checksums."
(let ((sumfile (expand-file-name "checksums.dat" org-mobile-directory))
(files org-mobile-checksum-files)
entry file sum)
(with-temp-file sumfile
(set-buffer-file-coding-system 'undecided-unix nil)
(while (setq entry (pop files))
(setq file (car entry) sum (cdr entry))
(insert (format "%s %s\n" sum file))))))
(setq org-mobile-directory "/home/user/mobileorg")
(setq org-directory "/home/user/mobileorg")
(setq org-mobile-inbox-for-pull "/home/user/mobileorg/inbox.org")
(permissions on this folder are all okay and everything writes properly)
However, if I do org-mobile-push running emacs23 as my regular user, it creates checksums.dat in the regular user home, instead of in the desired folder, and the hashes from the mobileorg directory are not present.
I tried setting this variable as well to no effect:
(setq org-mobile-checksum-files "/home/user/mobileorg/checksums.dat")
I also tried setting up this function I found to fix the directory problem (http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-mobile.el;hb=HEAD), but my elisp is not good; I couldn't make it work:
(defun org-mobile-write-checksums ()
"Create checksums for all files in `org-mobile-directory'.
The table of checksums is written to the file mobile-checksums."
(let ((sumfile (expand-file-name "checksums.dat" org-mobile-directory))
(files org-mobile-checksum-files)
entry file sum)
(with-temp-file sumfile
(set-buffer-file-coding-system 'undecided-unix nil)
(while (setq entry (pop files))
(setq file (car entry) sum (cdr entry))
(insert (format "%s %s\n" sum file))))))