org-archive.el 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. ;;; org-archive.el --- Archiving for Org-mode
  2. ;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
  3. ;; Author: Carsten Dominik <carsten at orgmode dot org>
  4. ;; Keywords: outlines, hypermedia, calendar, wp
  5. ;; Homepage: http://orgmode.org
  6. ;;
  7. ;; This file is part of GNU Emacs.
  8. ;;
  9. ;; GNU Emacs is free software: you can redistribute it and/or modify
  10. ;; it under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation, either version 3 of the License, or
  12. ;; (at your option) any later version.
  13. ;; GNU Emacs is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;
  21. ;;; Commentary:
  22. ;; This file contains the face definitions for Org.
  23. ;;; Code:
  24. (require 'org)
  25. (declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ())
  26. (declare-function org-datetree-find-date-create "org-datetree" (date &optional keep-restriction))
  27. (defcustom org-archive-default-command 'org-archive-subtree
  28. "The default archiving command."
  29. :group 'org-archive
  30. :type '(choice
  31. (const org-archive-subtree)
  32. (const org-archive-to-archive-sibling)
  33. (const org-archive-set-tag)))
  34. (defcustom org-archive-reversed-order nil
  35. "Non-nil means make the tree first child under the archive heading, not last."
  36. :group 'org-archive
  37. :version "24.1"
  38. :type 'boolean)
  39. (defcustom org-archive-sibling-heading "Archive"
  40. "Name of the local archive sibling that is used to archive entries locally.
  41. Locally means: in the tree, under a sibling.
  42. See `org-archive-to-archive-sibling' for more information."
  43. :group 'org-archive
  44. :type 'string)
  45. (defcustom org-archive-mark-done nil
  46. "Non-nil means mark entries as DONE when they are moved to the archive file.
  47. This can be a string to set the keyword to use. When t, Org-mode will
  48. use the first keyword in its list that means done."
  49. :group 'org-archive
  50. :type '(choice
  51. (const :tag "No" nil)
  52. (const :tag "Yes" t)
  53. (string :tag "Use this keyword")))
  54. (defcustom org-archive-stamp-time t
  55. "Non-nil means add a time stamp to entries moved to an archive file.
  56. This variable is obsolete and has no effect anymore, instead add or remove
  57. `time' from the variable `org-archive-save-context-info'."
  58. :group 'org-archive
  59. :type 'boolean)
  60. (defcustom org-archive-subtree-add-inherited-tags 'infile
  61. "Non-nil means append inherited tags when archiving a subtree."
  62. :group 'org-archive
  63. :version "24.1"
  64. :type '(choice
  65. (const :tag "Never" nil)
  66. (const :tag "When archiving a subtree to the same file" infile)
  67. (const :tag "Always" t)))
  68. (defcustom org-archive-save-context-info '(time file olpath category todo itags)
  69. "Parts of context info that should be stored as properties when archiving.
  70. When a subtree is moved to an archive file, it loses information given by
  71. context, like inherited tags, the category, and possibly also the TODO
  72. state (depending on the variable `org-archive-mark-done').
  73. This variable can be a list of any of the following symbols:
  74. time The time of archiving.
  75. file The file where the entry originates.
  76. ltags The local tags, in the headline of the subtree.
  77. itags The tags the subtree inherits from further up the hierarchy.
  78. todo The pre-archive TODO state.
  79. category The category, taken from file name or #+CATEGORY lines.
  80. olpath The outline path to the item. These are all headlines above
  81. the current item, separated by /, like a file path.
  82. For each symbol present in the list, a property will be created in
  83. the archived entry, with a prefix \"ARCHIVE_\", to remember this
  84. information."
  85. :group 'org-archive
  86. :type '(set :greedy t
  87. (const :tag "Time" time)
  88. (const :tag "File" file)
  89. (const :tag "Category" category)
  90. (const :tag "TODO state" todo)
  91. (const :tag "Priority" priority)
  92. (const :tag "Inherited tags" itags)
  93. (const :tag "Outline path" olpath)
  94. (const :tag "Local tags" ltags)))
  95. (defun org-get-local-archive-location ()
  96. "Get the archive location applicable at point."
  97. (let ((re "^#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$")
  98. prop)
  99. (save-excursion
  100. (save-restriction
  101. (widen)
  102. (setq prop (org-entry-get nil "ARCHIVE" 'inherit))
  103. (cond
  104. ((and prop (string-match "\\S-" prop))
  105. prop)
  106. ((or (re-search-backward re nil t)
  107. (re-search-forward re nil t))
  108. (match-string 1))
  109. (t org-archive-location))))))
  110. (defun org-add-archive-files (files)
  111. "Splice the archive files into the list of files.
  112. This implies visiting all these files and finding out what the
  113. archive file is."
  114. (org-uniquify
  115. (apply
  116. 'append
  117. (mapcar
  118. (lambda (f)
  119. (if (not (file-exists-p f))
  120. nil
  121. (with-current-buffer (org-get-agenda-file-buffer f)
  122. (cons f (org-all-archive-files)))))
  123. files))))
  124. (defun org-all-archive-files ()
  125. "Get a list of all archive files used in the current buffer."
  126. (let (file files)
  127. (save-excursion
  128. (save-restriction
  129. (goto-char (point-min))
  130. (while (re-search-forward
  131. "^\\(#\\+\\|[ \t]*:\\)ARCHIVE:[ \t]+\\(.*\\)"
  132. nil t)
  133. (setq file (org-extract-archive-file
  134. (org-match-string-no-properties 2)))
  135. (and file (> (length file) 0) (file-exists-p file)
  136. (add-to-list 'files file)))))
  137. (setq files (nreverse files))
  138. (setq file (org-extract-archive-file))
  139. (and file (> (length file) 0) (file-exists-p file)
  140. (add-to-list 'files file))
  141. files))
  142. (defun org-extract-archive-file (&optional location)
  143. "Extract and expand the file name from archive LOCATION.
  144. if LOCATION is not given, the value of `org-archive-location' is used."
  145. (setq location (or location org-archive-location))
  146. (if (string-match "\\(.*\\)::\\(.*\\)" location)
  147. (if (= (match-beginning 1) (match-end 1))
  148. (buffer-file-name (buffer-base-buffer))
  149. (expand-file-name
  150. (format (match-string 1 location)
  151. (file-name-nondirectory
  152. (buffer-file-name (buffer-base-buffer))))))))
  153. (defun org-extract-archive-heading (&optional location)
  154. "Extract the heading from archive LOCATION.
  155. if LOCATION is not given, the value of `org-archive-location' is used."
  156. (setq location (or location org-archive-location))
  157. (if (string-match "\\(.*\\)::\\(.*\\)" location)
  158. (format (match-string 2 location)
  159. (file-name-nondirectory
  160. (buffer-file-name (buffer-base-buffer))))))
  161. ;;;###autoload
  162. (defun org-archive-subtree (&optional find-done)
  163. "Move the current subtree to the archive.
  164. The archive can be a certain top-level heading in the current file, or in
  165. a different file. The tree will be moved to that location, the subtree
  166. heading be marked DONE, and the current time will be added.
  167. When called with prefix argument FIND-DONE, find whole trees without any
  168. open TODO items and archive them (after getting confirmation from the user).
  169. If the cursor is not at a headline when this command is called, try all level
  170. 1 trees. If the cursor is on a headline, only try the direct children of
  171. this heading."
  172. (interactive "P")
  173. (if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
  174. (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
  175. 'region-start-level 'region))
  176. org-loop-over-headlines-in-active-region)
  177. (org-map-entries
  178. `(progn (setq org-map-continue-from (progn (org-back-to-heading) (point)))
  179. (org-archive-subtree ,find-done))
  180. org-loop-over-headlines-in-active-region
  181. cl (if (outline-invisible-p) (org-end-of-subtree nil t))))
  182. (if find-done
  183. (org-archive-all-done)
  184. ;; Save all relevant TODO keyword-relatex variables
  185. (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler
  186. (tr-org-todo-keywords-1 org-todo-keywords-1)
  187. (tr-org-todo-kwd-alist org-todo-kwd-alist)
  188. (tr-org-done-keywords org-done-keywords)
  189. (tr-org-todo-regexp org-todo-regexp)
  190. (tr-org-todo-line-regexp org-todo-line-regexp)
  191. (tr-org-odd-levels-only org-odd-levels-only)
  192. (this-buffer (current-buffer))
  193. ;; start of variables that will be used for saving context
  194. ;; The compiler complains about them - keep them anyway!
  195. (file (abbreviate-file-name
  196. (or (buffer-file-name (buffer-base-buffer))
  197. (error "No file associated to buffer"))))
  198. (olpath (mapconcat 'identity (org-get-outline-path) "/"))
  199. (time (format-time-string
  200. (substring (cdr org-time-stamp-formats) 1 -1)
  201. (current-time)))
  202. category todo priority ltags itags atags
  203. ;; end of variables that will be used for saving context
  204. location afile heading buffer level newfile-p infile-p visiting
  205. datetree-date datetree-subheading-p)
  206. ;; Find the local archive location
  207. (setq location (org-get-local-archive-location)
  208. afile (org-extract-archive-file location)
  209. heading (org-extract-archive-heading location)
  210. infile-p (equal file (abbreviate-file-name (or afile ""))))
  211. (unless afile
  212. (error "Invalid `org-archive-location'"))
  213. (if (> (length afile) 0)
  214. (setq newfile-p (not (file-exists-p afile))
  215. visiting (find-buffer-visiting afile)
  216. buffer (or visiting (find-file-noselect afile)))
  217. (setq buffer (current-buffer)))
  218. (unless buffer
  219. (error "Cannot access file \"%s\"" afile))
  220. (when (string-match "\\`datetree/" heading)
  221. ;; Replace with ***, to represent the 3 levels of headings the
  222. ;; datetree has.
  223. (setq heading (replace-regexp-in-string "\\`datetree/" "***" heading))
  224. (setq datetree-subheading-p (> (length heading) 3))
  225. (setq datetree-date (org-date-to-gregorian
  226. (or (org-entry-get nil "CLOSED" t) time))))
  227. (if (and (> (length heading) 0)
  228. (string-match "^\\*+" heading))
  229. (setq level (match-end 0))
  230. (setq heading nil level 0))
  231. (save-excursion
  232. (org-back-to-heading t)
  233. ;; Get context information that will be lost by moving the tree
  234. (setq category (org-get-category nil 'force-refresh)
  235. todo (and (looking-at org-todo-line-regexp)
  236. (match-string 2))
  237. priority (org-get-priority
  238. (if (match-end 3) (match-string 3) ""))
  239. ltags (org-get-tags)
  240. itags (org-delete-all ltags (org-get-tags-at))
  241. atags (org-get-tags-at))
  242. (setq ltags (mapconcat 'identity ltags " ")
  243. itags (mapconcat 'identity itags " "))
  244. ;; We first only copy, in case something goes wrong
  245. ;; we need to protect `this-command', to avoid kill-region sets it,
  246. ;; which would lead to duplication of subtrees
  247. (let (this-command) (org-copy-subtree 1 nil t))
  248. (set-buffer buffer)
  249. ;; Enforce org-mode for the archive buffer
  250. (if (not (derived-mode-p 'org-mode))
  251. ;; Force the mode for future visits.
  252. (let ((org-insert-mode-line-in-empty-file t)
  253. (org-inhibit-startup t))
  254. (call-interactively 'org-mode)))
  255. (when newfile-p
  256. (goto-char (point-max))
  257. (insert (format "\nArchived entries from file %s\n\n"
  258. (buffer-file-name this-buffer))))
  259. (when datetree-date
  260. (require 'org-datetree)
  261. (org-datetree-find-date-create datetree-date)
  262. (org-narrow-to-subtree))
  263. ;; Force the TODO keywords of the original buffer
  264. (let ((org-todo-line-regexp tr-org-todo-line-regexp)
  265. (org-todo-keywords-1 tr-org-todo-keywords-1)
  266. (org-todo-kwd-alist tr-org-todo-kwd-alist)
  267. (org-done-keywords tr-org-done-keywords)
  268. (org-todo-regexp tr-org-todo-regexp)
  269. (org-todo-line-regexp tr-org-todo-line-regexp)
  270. (org-odd-levels-only
  271. (if (local-variable-p 'org-odd-levels-only (current-buffer))
  272. org-odd-levels-only
  273. tr-org-odd-levels-only)))
  274. (goto-char (point-min))
  275. (show-all)
  276. (if (and heading (not (and datetree-date (not datetree-subheading-p))))
  277. (progn
  278. (if (re-search-forward
  279. (concat "^" (regexp-quote heading)
  280. (org-re "[ \t]*\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\($\\|\r\\)"))
  281. nil t)
  282. (goto-char (match-end 0))
  283. ;; Heading not found, just insert it at the end
  284. (goto-char (point-max))
  285. (or (bolp) (insert "\n"))
  286. ;; datetrees don't need too much spacing
  287. (insert (if datetree-date "" "\n") heading "\n")
  288. (end-of-line 0))
  289. ;; Make the subtree visible
  290. (show-subtree)
  291. (if org-archive-reversed-order
  292. (progn
  293. (org-back-to-heading t)
  294. (outline-next-heading))
  295. (org-end-of-subtree t))
  296. (skip-chars-backward " \t\r\n")
  297. (and (looking-at "[ \t\r\n]*")
  298. ;; datetree archives don't need so much spacing.
  299. (replace-match (if datetree-date "\n" "\n\n"))))
  300. ;; No specific heading, just go to end of file.
  301. (goto-char (point-max)) (unless datetree-date (insert "\n")))
  302. ;; Paste
  303. (org-paste-subtree (org-get-valid-level level (and heading 1)))
  304. ;; Shall we append inherited tags?
  305. (and itags
  306. (or (and (eq org-archive-subtree-add-inherited-tags 'infile)
  307. infile-p)
  308. (eq org-archive-subtree-add-inherited-tags t))
  309. (org-set-tags-to atags))
  310. ;; Mark the entry as done
  311. (when (and org-archive-mark-done
  312. (looking-at org-todo-line-regexp)
  313. (or (not (match-end 2))
  314. (not (member (match-string 2) org-done-keywords))))
  315. (let (org-log-done org-todo-log-states)
  316. (org-todo
  317. (car (or (member org-archive-mark-done org-done-keywords)
  318. org-done-keywords)))))
  319. ;; Add the context info
  320. (when org-archive-save-context-info
  321. (let ((l org-archive-save-context-info) e n v)
  322. (while (setq e (pop l))
  323. (when (and (setq v (symbol-value e))
  324. (stringp v) (string-match "\\S-" v))
  325. (setq n (concat "ARCHIVE_" (upcase (symbol-name e))))
  326. (org-entry-put (point) n v)))))
  327. (widen)
  328. ;; Save and kill the buffer, if it is not the same buffer.
  329. (when (not (eq this-buffer buffer))
  330. (save-buffer))))
  331. ;; Here we are back in the original buffer. Everything seems to have
  332. ;; worked. So now cut the tree and finish up.
  333. (let (this-command) (org-cut-subtree))
  334. (when (featurep 'org-inlinetask)
  335. (org-inlinetask-remove-END-maybe))
  336. (setq org-markers-to-move nil)
  337. (message "Subtree archived %s"
  338. (if (eq this-buffer buffer)
  339. (concat "under heading: " heading)
  340. (concat "in file: " (abbreviate-file-name afile))))))
  341. (org-reveal)
  342. (if (looking-at "^[ \t]*$")
  343. (outline-next-visible-heading 1))))
  344. ;;;###autoload
  345. (defun org-archive-to-archive-sibling ()
  346. "Archive the current heading by moving it under the archive sibling.
  347. The archive sibling is a sibling of the heading with the heading name
  348. `org-archive-sibling-heading' and an `org-archive-tag' tag. If this
  349. sibling does not exist, it will be created at the end of the subtree."
  350. (interactive)
  351. (if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
  352. (let ((cl (when (eq org-loop-over-headlines-in-active-region 'start-level)
  353. 'region-start-level 'region))
  354. org-loop-over-headlines-in-active-region)
  355. (org-map-entries
  356. '(progn (setq org-map-continue-from
  357. (progn (org-back-to-heading)
  358. (if (looking-at (concat "^.*:" org-archive-tag ":.*$"))
  359. (org-end-of-subtree t)
  360. (point))))
  361. (when (org-at-heading-p)
  362. (org-archive-to-archive-sibling)))
  363. org-loop-over-headlines-in-active-region
  364. cl (if (outline-invisible-p) (org-end-of-subtree nil t))))
  365. (save-restriction
  366. (widen)
  367. (let (b e pos leader level)
  368. (org-back-to-heading t)
  369. (looking-at org-outline-regexp)
  370. (setq leader (match-string 0)
  371. level (funcall outline-level))
  372. (setq pos (point))
  373. (condition-case nil
  374. (outline-up-heading 1 t)
  375. (error (setq e (point-max)) (goto-char (point-min))))
  376. (setq b (point))
  377. (unless e
  378. (condition-case nil
  379. (org-end-of-subtree t t)
  380. (error (goto-char (point-max))))
  381. (setq e (point)))
  382. (goto-char b)
  383. (unless (re-search-forward
  384. (concat "^" (regexp-quote leader)
  385. "[ \t]*"
  386. org-archive-sibling-heading
  387. "[ \t]*:"
  388. org-archive-tag ":") e t)
  389. (goto-char e)
  390. (or (bolp) (newline))
  391. (insert leader org-archive-sibling-heading "\n")
  392. (beginning-of-line 0)
  393. (org-toggle-tag org-archive-tag 'on))
  394. (beginning-of-line 1)
  395. (if org-archive-reversed-order
  396. (outline-next-heading)
  397. (org-end-of-subtree t t))
  398. (save-excursion
  399. (goto-char pos)
  400. (let ((this-command this-command)) (org-cut-subtree)))
  401. (org-paste-subtree (org-get-valid-level level 1))
  402. (org-set-property
  403. "ARCHIVE_TIME"
  404. (format-time-string
  405. (substring (cdr org-time-stamp-formats) 1 -1)
  406. (current-time)))
  407. (outline-up-heading 1 t)
  408. (hide-subtree)
  409. (org-cycle-show-empty-lines 'folded)
  410. (goto-char pos)))
  411. (org-reveal)
  412. (if (looking-at "^[ \t]*$")
  413. (outline-next-visible-heading 1))))
  414. (defun org-archive-all-done (&optional tag)
  415. "Archive sublevels of the current tree without open TODO items.
  416. If the cursor is not on a headline, try all level 1 trees. If
  417. it is on a headline, try all direct children.
  418. When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag."
  419. (let ((re org-not-done-heading-regexp) re1
  420. (rea (concat ".*:" org-archive-tag ":"))
  421. (begm (make-marker))
  422. (endm (make-marker))
  423. (question (if tag "Set ARCHIVE tag (no open TODO items)? "
  424. "Move subtree to archive (no open TODO items)? "))
  425. beg end (cntarch 0))
  426. (if (org-at-heading-p)
  427. (progn
  428. (setq re1 (concat "^" (regexp-quote
  429. (make-string
  430. (+ (- (match-end 0) (match-beginning 0) 1)
  431. (if org-odd-levels-only 2 1))
  432. ?*))
  433. " "))
  434. (move-marker begm (point))
  435. (move-marker endm (org-end-of-subtree t)))
  436. (setq re1 "^* ")
  437. (move-marker begm (point-min))
  438. (move-marker endm (point-max)))
  439. (save-excursion
  440. (goto-char begm)
  441. (while (re-search-forward re1 endm t)
  442. (setq beg (match-beginning 0)
  443. end (save-excursion (org-end-of-subtree t) (point)))
  444. (goto-char beg)
  445. (if (re-search-forward re end t)
  446. (goto-char end)
  447. (goto-char beg)
  448. (if (and (or (not tag) (not (looking-at rea)))
  449. (y-or-n-p question))
  450. (progn
  451. (if tag
  452. (org-toggle-tag org-archive-tag 'on)
  453. (org-archive-subtree))
  454. (setq cntarch (1+ cntarch)))
  455. (goto-char end)))))
  456. (message "%d trees archived" cntarch)))
  457. ;;;###autoload
  458. (defun org-toggle-archive-tag (&optional find-done)
  459. "Toggle the archive tag for the current headline.
  460. With prefix ARG, check all children of current headline and offer tagging
  461. the children that do not contain any open TODO items."
  462. (interactive "P")
  463. (if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
  464. (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
  465. 'region-start-level 'region))
  466. org-loop-over-headlines-in-active-region)
  467. (org-map-entries
  468. `(org-toggle-archive-tag ,find-done)
  469. org-loop-over-headlines-in-active-region
  470. cl (if (outline-invisible-p) (org-end-of-subtree nil t))))
  471. (if find-done
  472. (org-archive-all-done 'tag)
  473. (let (set)
  474. (save-excursion
  475. (org-back-to-heading t)
  476. (setq set (org-toggle-tag org-archive-tag))
  477. (when set (hide-subtree)))
  478. (and set (beginning-of-line 1))
  479. (message "Subtree %s" (if set "archived" "unarchived"))))))
  480. (defun org-archive-set-tag ()
  481. "Set the ARCHIVE tag."
  482. (interactive)
  483. (if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
  484. (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
  485. 'region-start-level 'region))
  486. org-loop-over-headlines-in-active-region)
  487. (org-map-entries
  488. 'org-archive-set-tag
  489. org-loop-over-headlines-in-active-region
  490. cl (if (outline-invisible-p) (org-end-of-subtree nil t))))
  491. (org-toggle-tag org-archive-tag 'on)))
  492. ;;;###autoload
  493. (defun org-archive-subtree-default ()
  494. "Archive the current subtree with the default command.
  495. This command is set with the variable `org-archive-default-command'."
  496. (interactive)
  497. (call-interactively org-archive-default-command))
  498. ;;;###autoload
  499. (defun org-archive-subtree-default-with-confirmation ()
  500. "Archive the current subtree with the default command.
  501. This command is set with the variable `org-archive-default-command'."
  502. (interactive)
  503. (if (y-or-n-p "Archive this subtree or entry? ")
  504. (call-interactively org-archive-default-command)
  505. (error "Abort")))
  506. (provide 'org-archive)
  507. ;; Local variables:
  508. ;; generated-autoload-file: "org-loaddefs.el"
  509. ;; End:
  510. ;;; org-archive.el ends here