Function: org-mobile-push

org-mobile-push is an autoloaded, interactive and byte-compiled function defined in org-mobile.el.gz.

Signature

(org-mobile-push)

Documentation

Push the current state of Org affairs to the target directory.

This will create the index file, copy all agenda files there, and also create all custom agenda views, for upload to the mobile phone.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-mobile.el.gz
;;;###autoload
(defun org-mobile-push ()
  "Push the current state of Org affairs to the target directory.
This will create the index file, copy all agenda files there, and also
create all custom agenda views, for upload to the mobile phone."
  (interactive)
  (let ((org-agenda-buffer-name "*SUMO*")
	(org-agenda-tag-filter org-agenda-tag-filter)
	(org-agenda-redo-command org-agenda-redo-command))
    ;; Offer to save agenda-related buffers before pushing, preventing
    ;; "Non-existent agenda file" prompt for lock files (see #19448).
    (let ((agenda-buffers (org-buffer-list 'agenda)))
      (save-some-buffers nil
			 (lambda () (memq (current-buffer) agenda-buffers))))
    (save-excursion
      (save-restriction
	(save-window-excursion
	  (run-hooks 'org-mobile-pre-push-hook)
	  (org-mobile-check-setup)
	  (org-mobile-prepare-file-lists)
	  (message "Creating agendas...")
	  (let ((inhibit-redisplay t)
		(org-agenda-files (mapcar 'car org-mobile-files-alist)))
	    (org-mobile-create-sumo-agenda))
	  (message "Creating agendas...done")
	  (org-save-all-org-buffers) ; to save any IDs created by this process
	  (message "Copying files...")
	  (org-mobile-copy-agenda-files)
	  (message "Writing index file...")
	  (org-mobile-create-index-file)
	  (message "Writing checksums...")
	  (org-mobile-write-checksums)
	  (run-hooks 'org-mobile-post-push-hook)))))
  (org-agenda-maybe-redo)
  (message "Files for mobile viewer staged"))