Browse Source

Make updating the mibileorg.org checksum safe

Carsten Dominik 15 years ago
parent
commit
9072f54582
3 changed files with 6 additions and 2 deletions
  1. 5 0
      lisp/ChangeLog
  2. 0 1
      lisp/org-clock.el
  3. 1 1
      lisp/org-mobile.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-10-22  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-mobile.el (org-mobile-update-checksum-for-capture-file):
+	Make sure the regexp search can fail without throwing an error.
+
 2009-10-22  John Wiegley  <jwiegley@gmail.com>
 2009-10-22  John Wiegley  <jwiegley@gmail.com>
 
 
 	* org-clock.el (org-resolve-clocks-if-idle): Fix to the way idle
 	* org-clock.el (org-resolve-clocks-if-idle): Fix to the way idle

+ 0 - 1
lisp/org-clock.el

@@ -218,7 +218,6 @@ string as argument."
   :group 'org-clock
   :group 'org-clock
   :type 'boolean)
   :type 'boolean)
 
 
-
 (defvar org-clock-in-prepare-hook nil
 (defvar org-clock-in-prepare-hook nil
   "Hook run when preparing the clock.
   "Hook run when preparing the clock.
 This hook is run before anything happens to the task that
 This hook is run before anything happens to the task that

+ 1 - 1
lisp/org-mobile.el

@@ -547,7 +547,7 @@ If nothing new has beed added, return nil."
       (with-current-buffer buffer
       (with-current-buffer buffer
 	(when (re-search-forward (concat "\\([0-9a-fA-F]\\{30,\\}\\).*?"
 	(when (re-search-forward (concat "\\([0-9a-fA-F]\\{30,\\}\\).*?"
 					 (regexp-quote org-mobile-capture-file)
 					 (regexp-quote org-mobile-capture-file)
-					 "[ \t]*$"))
+					 "[ \t]*$") nil t)
 	  (goto-char (match-beginning 1))
 	  (goto-char (match-beginning 1))
 	  (delete-region (match-beginning 1) (match-end 1))
 	  (delete-region (match-beginning 1) (match-end 1))
 	  (insert (md5 buffer-string))
 	  (insert (md5 buffer-string))