Function: org-mobile-update-checksum-for-capture-file
org-mobile-update-checksum-for-capture-file is a byte-compiled
function defined in org-mobile.el.gz.
Signature
(org-mobile-update-checksum-for-capture-file BUFFER-STRING)
Documentation
Find the checksum line and modify it to match BUFFER-STRING.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-mobile.el.gz
(defun org-mobile-update-checksum-for-capture-file (buffer-string)
"Find the checksum line and modify it to match BUFFER-STRING."
(let* ((file (expand-file-name "checksums.dat" org-mobile-directory))
(buffer (find-file-noselect file)))
(when buffer
(with-current-buffer buffer
(when (re-search-forward (concat "\\([[:xdigit:]]\\{30,\\}\\).*?"
(regexp-quote org-mobile-capture-file)
"[ \t]*$") nil t)
(goto-char (match-beginning 1))
(delete-region (match-beginning 1) (match-end 1))
(insert (md5 buffer-string))
(save-buffer)))
(kill-buffer buffer))))