Fix archiving for MobileOrg

This commit is contained in:
Carsten Dominik 2009-09-17 21:54:54 +01:00
parent 49699ec915
commit 0fd5ebc3bc
3 changed files with 27 additions and 0 deletions

View file

@ -1,5 +1,10 @@
2009-09-17 Carsten Dominik <carsten.dominik@gmail.com>
* org-mobile.el (org-mobile-apply-flags): Require `org-archive'.
* org-archive.el (org-archive-set-tag)
(org-archive-subtree-default): New commands.
* org-mobile.el (org-mobile-create-index-file): Fix link to
capture file.
(org-mobile-copy-agenda-files): Create the capture file if it does

View file

@ -34,6 +34,15 @@
(declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ())
(defcustom org-archive-default-command 'org-archive-subtree
"The default archiving command.
Currently this is only used by org-mobile.el."
:group 'org-archive
:type '(choice
(const org-archive-subtree)
(const org-archive-to-archive-sibling)
(const org-archive-set-tag)))
(defcustom org-archive-sibling-heading "Archive"
"Name of the local archive sibling that is used to archive entries locally.
Locally means: in the tree, under a sibling.
@ -428,6 +437,18 @@ the children that do not contain any open TODO items."
(and set (beginning-of-line 1))
(message "Subtree %s" (if set "archived" "unarchived")))))
(defun org-archive-set-tag ()
"Set the ARCHIVE tag."
(interactive)
(org-toggle-tag org-archive-tag 'on))
;;;###autoload
(defun org-archive-subtree-default ()
"Archive the current subtree with the default command.
This command is set with the variable `org-archive-default-command'."
(interactive)
(call-interactively 'org-archive-default-command))
(provide 'org-archive)
;; arch-tag: 0837f601-9699-43c3-8b90-631572ae6c85

View file

@ -319,6 +319,7 @@ If nothing new has beed added, return nil."
"Apply all flags in the current buffer.
If BEG and END are given, only do this in that region."
(interactive)
(require 'org-archive)
(setq org-mobile-last-flagged-files nil)
(setq beg (or beg (point-min)) end (or end (point-max)))
(goto-char beg)