Function: org-mobile-check-setup

org-mobile-check-setup is a byte-compiled function defined in org-mobile.el.gz.

Signature

(org-mobile-check-setup)

Documentation

Check if org-mobile-directory has been set up.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-mobile.el.gz
(defun org-mobile-check-setup ()
  "Check if `org-mobile-directory' has been set up."
  (org-mobile-cleanup-encryption-tempfile)
  (unless (and org-directory
	       (stringp org-directory)
	       (string-match "\\S-" org-directory)
	       (file-exists-p org-directory)
	       (file-directory-p org-directory))
    (error
     "Please set `org-directory' to the directory where your org files live"))
  (unless (and org-mobile-directory
	       (stringp org-mobile-directory)
	       (string-match "\\S-" org-mobile-directory)
	       (file-exists-p org-mobile-directory)
	       (file-directory-p org-mobile-directory))
    (error
     "Variable `org-mobile-directory' must point to an existing directory"))
  (unless (and org-mobile-inbox-for-pull
	       (stringp org-mobile-inbox-for-pull)
	       (string-match "\\S-" org-mobile-inbox-for-pull)
	       (file-exists-p
		(file-name-directory org-mobile-inbox-for-pull)))
    (error
     "Variable `org-mobile-inbox-for-pull' must point to a file in an existing directory"))
  (unless (and org-mobile-checksum-binary
	       (string-match "\\S-" org-mobile-checksum-binary))
    (error "No executable found to compute checksums"))
  (when org-mobile-use-encryption
    (unless (string-match "\\S-" (org-mobile-encryption-password))
      (error
       "To use encryption, you must set `org-mobile-encryption-password'"))
    (unless (file-writable-p org-mobile-encryption-tempfile)
      (error "Cannot write to encryption tempfile %s"
	     org-mobile-encryption-tempfile))
    (unless (executable-find "openssl")
      (error "OpenSSL is needed to encrypt files"))))