emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Puneeth Chaganti <punchagan@gmail.com>
To: "Urs Rau (UK)" <urs.rau@om.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Can I archive into datetree based on CLOSED date property
Date: Mon, 21 Feb 2011 13:42:08 +0530	[thread overview]
Message-ID: <AANLkTinTAqto-buzr=K7ik7q_1fPA6QgisGjUCmw06dW@mail.gmail.com> (raw)
In-Reply-To: <36678C5F-9B2E-42FF-8CDF-A45D3A14A336@uk.om.org>

On Mon, Feb 21, 2011 at 2:55 AM, Urs Rau (UK) <urs.rau@om.org> wrote:
> Hi,
>
> On 20 Feb 2011, at 10:55, Puneeth Chaganti wrote:
>
>> On Sun, Feb 20, 2011 at 3:58 PM, Urs Rau (UK) <urs.rau@om.org> wrote:
>>> Hi
>>> I would quite like to have a function that would work on a region , or on a whole org file of todos and archive completed todos or a selected region into a datetree in the archive file in such a way that all completed todo items would be filed under the date on which their property says they were completed or closed.
>>> Maybe it can already do it and I just need to learn how?
>>
>> Worg has a hack [1] by Osamu Okanu, that modifies the
>> org-archive-subtree function to archive into a datetree. Combining
>> this with the org-map-entries function, you should be able to achieve
>> what you want.
>>
>> Hope this helps,
>> Puneeth
>>
>
> Thanks. I am no elisp coder so this is likely beyond me. How hard would this be to do in elisp?
>
> I guess the line of code from Osamu Okanu to ammend would be:
>
> (let* ((dct (decode-time (org-current-time)))
>
> and somehow get it to read the "CLOSED" date property where Osamu's code has "org-current-time"?
>
> And then I have to somehow call up 'org-map-entries' function to process all completed todo items.
>
> Is there a function that already knows what my actual 'completed' org-todo-keywords items out of the full custom list of my 'org-todo-keywords' are?

I've tried [1] to modify Osamu's defadvice to do what you want.  It
almost does what you want, except that I have not been able to
properly set the `org-map-continue-from' variable. (  May be someone
else can help. )

With the present function, you have to run the `org-map-entries'
function multiple times, until all your items have been archived.

Hope this helps,
Puneeth

[1] - https://gist.github.com/836799

ps: Please CC the list also, when replying to this email.

      parent reply	other threads:[~2011-02-21  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 10:28 Can I archive into datetree based on CLOSED date property Urs Rau (UK)
2011-02-20 10:55 ` Puneeth Chaganti
     [not found]   ` <36678C5F-9B2E-42FF-8CDF-A45D3A14A336@uk.om.org>
2011-02-21  8:12     ` Puneeth Chaganti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinTAqto-buzr=K7ik7q_1fPA6QgisGjUCmw06dW@mail.gmail.com' \
    --to=punchagan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=urs.rau@om.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).