Fix some bugs in MobileOrg support

This commit is contained in:
Carsten Dominik 2009-09-17 13:46:25 +01:00
parent 417736a3d4
commit 5deffac8f6
4 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2009-09-17 Carsten Dominik <carsten.dominik@gmail.com>
* org.texi (Setting up the staging area): Fix the example.
2009-09-15 Carsten Dominik <carsten.dominik@gmail.com> 2009-09-15 Carsten Dominik <carsten.dominik@gmail.com>
* org.texi (MobileOrg): New section. * org.texi (MobileOrg): New section.

View File

@ -11682,7 +11682,7 @@ staged in @file{~/stage}, and Org-mode hooks take care of moving files to and
from the WebDAV directory using @file{scp}. from the WebDAV directory using @file{scp}.
@example @example
(setq org-mobile-directory "~/MobileOrg/stage/") (setq org-mobile-directory "~/stage/")
(add-hook 'org-mobile-post-push-hook (add-hook 'org-mobile-post-push-hook
(lambda () (lambda ()
(shell-command "scp ~/stage/* user@@webdavhost:mobile/"))) (shell-command "scp ~/stage/* user@@webdavhost:mobile/")))

View File

@ -1,5 +1,10 @@
2009-09-17 Carsten Dominik <carsten.dominik@gmail.com> 2009-09-17 Carsten Dominik <carsten.dominik@gmail.com>
* org-mobile.el (org-mobile-create-index-file): Fix link to
capture file.
(org-mobile-copy-agenda-files): Create the capture file if it does
not exist.
* org-clock.el (org-clock-clocktable-default-properties): New * org-clock.el (org-clock-clocktable-default-properties): New
option. option.
(org-clock-report): Use (org-clock-report): Use

View File

@ -184,16 +184,24 @@ agenda view showing the flagged items."
(file-name-sans-extension (file-name-sans-extension
(file-name-nondirectory file)))))) (file-name-nondirectory file))))))
(insert (format "* [[file:%s][Captured before last sync]]\n" (insert (format "* [[file:%s][Captured before last sync]]\n"
(file-name-sans-extension org-mobile-capture-file)))))) org-mobile-capture-file)))))
(defun org-mobile-copy-agenda-files () (defun org-mobile-copy-agenda-files ()
"Copy all agenda files to the stage or WebDAV directory." "Copy all agenda files to the stage or WebDAV directory."
(let ((files (org-agenda-files t)) file) (let ((files (org-agenda-files t)) file buf)
(while (setq file (pop files)) (while (setq file (pop files))
(if (file-exists-p file) (if (file-exists-p file)
(copy-file file (expand-file-name (file-name-nondirectory file) (copy-file file (expand-file-name (file-name-nondirectory file)
org-mobile-directory) org-mobile-directory)
'ok-if-exists))))) 'ok-if-exists)))
(setq file (expand-file-name org-mobile-capture-file
org-mobile-directory))
(unless (file-exists-p file)
(save-excursion
(setq buf (find-file file))
(insert "\n")
(save-buffer)
(kill-buffer buf)))))
(defun org-mobile-write-checksums () (defun org-mobile-write-checksums ()
"Create checksums for all files in `org-mobile-directory'. "Create checksums for all files in `org-mobile-directory'.