[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] DONE items skipped in org-map-entries

From: Stefan van der Walt
Subject: [O] DONE items skipped in org-map-entries
Date: Sat, 27 Aug 2016 15:49:42 -0700

Dear org-mode developers,

For a while now, I've been using the solution to the following
StackOverflow question to archive all done subitems:


(I've repeated the question and answer below, for completeness.)

A few months ago, I noticed that the given solution no longer works.
Investigating (with org-mode/2016-08-22), it looks like org-map-entries
skips DONE items---likely different behavior from before.

The following test function can be used to replicate:

(defun org-count ()
  (message "entries %d" (length
   (org-map-entries t t 'tree))))

Executing this function on any heading with the "DONE" tag returns 0.

Is this the correct behavior for org-map-entries?  If so, what do you
recommend as a better solution for archiving all done sub-items?

Thanks for your help,

StackOverflow Q: How do I archive all subitems?

(defun org-archive-done-tasks ()
   (lambda ()
     (setq org-map-continue-from (outline-previous-heading)))
   "/DONE" 'tree))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]