diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efee2b0cc..09c1e4ac3 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-11-06 Carsten Dominik + * org-mobile.el (org-mobile-before-process-capture-hook): New hook. + (org-mobile-pull): Run `org-mobile-before-process-capture-hook'. + * org.el (org-indent-mode): Define variable already in org.el. (org-unfontify-region): Remove line-prefix and wrap-prefix properties only if org-indent-mode is active. diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index f6769f4f3..db75d6def 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -252,6 +252,11 @@ create all custom agenda views, for upload to the mobile phone." (select-window cw))))) (message "Files for mobile viewer staged")) +(defvar org-mobile-before-process-capture-hook nil + "Hook that is run after content was moved to `org-mobile-inbox-for-pull'. +The inbox file is in the current buffer, and the buffer is arrowed to the +new captured data.") + ;;;###autoload (defun org-mobile-pull () "Pull the contents of `org-mobile-capture-file' and integrate them. @@ -263,6 +268,10 @@ agenda view showing the flagged items." (let ((insertion-marker (org-mobile-move-capture))) (if (not (markerp insertion-marker)) (message "No new items") + (org-with-point-at insertion-marker + (save-restriction + (narrow-to-region (point) (point-max)) + (run-hooks 'org-mobile-before-process-capture-hook))) (org-with-point-at insertion-marker (org-mobile-apply (point) (point-max))) (move-marker insertion-marker nil)