Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to archive deleted tasks. #17

Closed
lawlist opened this issue Jun 24, 2013 · 9 comments
Closed

How to archive deleted tasks. #17

lawlist opened this issue Jun 24, 2013 · 9 comments

Comments

@lawlist
Copy link

lawlist commented Jun 24, 2013

I found this nice function that archives a done task, and I'm wondering if there is any way to modify org-toodledo-mark-task-deleted so that the task gets deleted and archived all in one fell swoop?

(defun my-org-archive-done-tasks ()
(interactive)
(org-map-entries 'org-archive-subtree "/DONE" 'file))

@christopherjwhite
Copy link
Owner

This is a good idea - let me take a look at it this weekend.

@lawlist
Copy link
Author

lawlist commented Aug 25, 2013

Thank you for adding support for archiving completed tasks -- greatly appreciate ! :)

@christopherjwhite
Copy link
Owner

FYI -- this only archives deleted tasks, not completed tasks... I've got most of the code written for archiving completed tasks, just testing it out, so stay tuned!

@christopherjwhite
Copy link
Owner

Ok -- just pushed version 2.13 which now supports archiving completed tasks. You'll need to set org-toodledo-archive-completed-tasks to t, as it defaults to nil. This is designed to work whether you complete tasks in org or on Toodledo -- at sync time, the tasks are synced and then archived.

@lawlist
Copy link
Author

lawlist commented Sep 2, 2013

Thank you very much. I'll give it whirl in the next few days. I manually modify several portions of the source for a variety of reasons, and need to diff each new release and incorporate my personal modifications before being able to try it out on my master calendar database. The modified version I am using is more in line with the actual Toodledo options that are available -- i.e., Next Action, Active, Delegated; and, all of the Toodledo priorities as well.

@christopherjwhite
Copy link
Owner

Let me know if you have any changes that you might like to merge back
into the main project and I'll take a look...

On 9/2/13 7:04 PM, lawlist wrote:

Thank you very much. I'll give it whirl in the next few days. I
manually modify several portions of the source for a variety of
reasons, and need to diff each new release and incorporate my personal
modifications before being able to try it out on my master calendar
database. The modified version I am using is more in line with the
actual Toodledo options that are available -- i.e., Next Action,
Active, Delegated; and, all of the Toodledo priorities as well.


Reply to this email directly or view it on GitHub
#17 (comment).

@lawlist
Copy link
Author

lawlist commented Sep 16, 2013

Deleting / archiving uses an internet connection to communicate with Toodledo servers before synchronizing. Is there any way to delete / archive tasks (off-line) without communicating with Toodledo, and then have the deletions take effect only when synchronizing?

@christopherjwhite
Copy link
Owner

Yeah -- this is a tough one. It has to parse the current task in
org-mode in order to delete it, and parsing it requires the folder name
to id map, context name to id map, etc. These maps are built on demand
by contacting the server to get the latest values. So, the calls to the
Toodledo servers should only occur the first time you do something after
opening your todo org-mode file. That will download and cache the
values in memory. Subsequent deletes should not issue a call.

I definitely see the need here, but it's going to take a bit more effort
to get that done....

...cj

On 9/16/13 1:41 PM, lawlist wrote:

Deleting / archiving uses an internet connection to communicate with
Toodledo servers |before| synchronizing. Is there any way to delete /
archive tasks |without| communicating with Toodledo, and then have the
deletions take effect |only| when synchronizing?


Reply to this email directly or view it on GitHub
#17 (comment).

@lawlist
Copy link
Author

lawlist commented Sep 22, 2013

Thank you for helping me to understand how that function works. In the meantime -- instead of deleting / archiving immediately -- I will set the status to None with a -1 Negative priority and refile the completed tasks to a section at the bottom of my org file called * COMPLETED with :ToodledoFolder: COMPLETED. Then, whenever I have a strong internet connection, I can archive / delete the tasks that were previously completed. Perhaps that is a possible workaround for the need of an internet connection -- i.e., on synchronization, tasks with a status of None and a -1 Negative priority to be archived and deleted IF the user has chosen that option -- e.g., (setq delete-archive-completed-on-sync t) -- the function occurring after newly completed tasks on Toodledo are synchronized to the org file so they in turn also get archived / deleted.

EDIT: I see that you recently implemented something similar (although without deleting from the Toodledo server) -- org-toodledo-archive-completed-tasks. I just updated my org-toodledo.el (with some custom modifications) and I will try out the new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants