From 03ecf8d91fcb593ac9145cbf4e90f00d1315820a Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 19 Oct 2009 13:03:09 +0200 Subject: [PATCH] Add checksum for mobileorg.org --- lisp/org-mobile.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index afb10f609..46a6cfba5 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -354,12 +354,13 @@ agenda view showing the flagged items." org-mobile-checksum-files)))) (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)))) + (save-excursion + (setq buf (find-file file)) + (and (= (point-min) (point-max)) (insert "\n")) + (save-buffer) + (push (cons org-mobile-capture-file (md5 (buffer-string))) + org-mobile-checksum-files)) + (kill-buffer buf))) (defun org-mobile-write-checksums () "Create checksums for all files in `org-mobile-directory'.