Browse Source

Add checksum for mobileorg.org

Carsten Dominik 15 years ago
parent
commit
03ecf8d91f
1 changed files with 7 additions and 6 deletions
  1. 7 6
      lisp/org-mobile.el

+ 7 - 6
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'.