From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan van der Walt Subject: DONE items skipped in org-map-entries Date: Sat, 27 Aug 2016 15:49:42 -0700 Message-ID: <1472338182.3937731.708026393.1463BA38@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdmQA-00038P-0O for emacs-orgmode@gnu.org; Sat, 27 Aug 2016 18:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdmQ5-0004UG-Qw for emacs-orgmode@gnu.org; Sat, 27 Aug 2016 18:49:48 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:33125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdmQ5-0004Tz-Hn for emacs-orgmode@gnu.org; Sat, 27 Aug 2016 18:49:45 -0400 Received: by mail-qk0-x244.google.com with SMTP id n66so8097912qkf.0 for ; Sat, 27 Aug 2016 15:49:44 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id 1sm14154354qkj.42.2016.08.27.15.49.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 15:49:43 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id E21E8202AD for ; Sat, 27 Aug 2016 18:49:42 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Dear org-mode developers, For a while now, I've been using the solution to the following StackOverflow question to archive all done subitems: http://stackoverflow.com/a/27043756/214686 (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 () (interactive) (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, St=C3=A9fan StackOverflow Q: How do I archive all subitems? A: (defun org-archive-done-tasks () (interactive) (org-map-entries (lambda () (org-archive-subtree) (setq org-map-continue-from (outline-previous-heading))) "/DONE" 'tree))