Package: notmuchtask
Linking mails (mutt, neomutt) to taskwarrior tasks and the other way around by utilising notmuch.Create tasks from (neo)mutt with one commandFind tasks already assigned to e-mailsInstallingpip install notmuchtaskUsagenotmuchtasklinks e-mails to tasks in taskwarrior. This is done by assigning notmuch tags to the e-mails.cliFinding tasksThefind-taskcommand will find the task(s) assigned to a message# reading the message from stdincattest.eml|notmuchtaskfind-task99c0768c-2dbd-4c8b-9b74-afe610653dd1# or reading the message by pathnotmuchtaskfind-tasktest.emlExit codes0Command ran successfully. The task-id has been written to stdout90An unexpected error has occured91File not found. The file passed could not be opened92The message(-id) could not be found in notmuch93The task could not be foundCreating tasksThefind-or-create-taskcommand will find the task(s) assigned to amessage and will create a new task if needed.# reading the message from stdincattest.eml|notmuchtaskfind-or-create-task# the first time a new task is created with the subject as title99c0768c-2dbd-4c8b-9b74-afe610653dd1cattest.eml|notmuchtaskfind-or-create-task# the second time no new task is created99c0768c-2dbd-4c8b-9b74-afe610653dd1# or reading the message by pathnotmuchtaskfind-or-create-tasktest.eml99c0768c-2dbd-4c8b-9b74-afe610653dd1Exit codes0Command ran successfully. The task-id has been written to stdout90An unexpected error has occurred91File not found. The file passed could not be opened92The message(-id) could not be found in notmuch(neo)muttAdd this to your.muttrc:# Make sure that there are no spaces at the beginning of the line
macro index,pager <F8> \
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<pipe-message>notmuchtask --debug find-or-create-task<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
"notmuchtask: assign mail to a task"configuringnotmuchtask can be configured by a config file:[tags]# notmuchtask uses notmuch tags to link messages to tasks# `prefix` is used as a prefix to the taskid. E.g.# if prefix is set to 'taskid:', and the task# e1544da8-8b9b-4bda-b4bc-8642c5627b59 is linked to the message# the tag 'taskid:e1544da8-8b9b-4bda-b4bc-8642c5627b59' is set on the# message.# default: taskid:prefix=taskid:[taskwarrior]# Executable#executable=taskThe following config files are evaluated, the first found configfile is used:The file passed with--configfileThe file pointed to by the environment variableNOTMUCHTASKRC~/.notmuchtask.confDevelopTidbits about development.Run DEV versionFor testing purposes you can run the code directly from the repository:# Setup the virtual environment
# Install site package with python3 bindings for notmuchaptinstallpython3-notmuchpipenv--rm# just in casepipenv--python3.6--site-packagespipenvinstall--dev# run the codepipenvshellpipinstall--editable.notmuchtask--helpTODOsKnown BugsMails with non-utf-8 charset fail to parseMessages without subject fail to parseIdeasPrio A (must), B (should), C (maybe never .. )Passthrough commands: enter the command for the task for a mailEdit task description on creationUse taskwarriors UDAs to store the message IDTransaction with task and notmuch incl. lockingVirtual folder to include tasks in mutt (??) (FUSE?)ChangelogVersion 0.0.3 (2019-05-22)Release for internal testingImproved handling of non-standard e-mailsVersion 0.0.2 (2019-05-20)Release for internal testingVersion 0.0.1 (2019-05-19)Initial test release