Skip to content

Commit

Permalink
Created the system-level mp_fwd tag (of type fwded) which is similar
Browse files Browse the repository at this point in the history
to the mp_rpl tag, and is used to track which messages get forwarded.

This may be used either by the user-interface for visual feedback, and
us also used by the auto-tagging systems when choosing ham/spam for
training.

This should resolve issue #260.
  • Loading branch information
BjarniRunar committed Jan 10, 2014
1 parent e0581fa commit 27eee42
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions mailpile/plugins/autotag.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def command(self):
#
no_trash = ['-in:%s' % t._key for t in config.get_tags(type='trash')]
interest = {}
for ttype in ('replied', 'read', 'tagged'):
for ttype in ('replied', 'fwded', 'read', 'tagged'):
interest[ttype] = set()
for tag in config.get_tags(type=ttype):
interest[ttype] |= idx.search(session,
Expand Down Expand Up @@ -197,7 +197,8 @@ def command(self):
interest[etag._key] = idx.search(session, srch
).as_set()
interesting.append(etag._key)
interesting.extend(['replied', 'read', 'tagged', None])
interesting.extend(['replied', 'fwded', 'read', 'tagged',
None])

# Go through the interest types in order of preference and
# while we still lack training data, add to the training set.
Expand Down
2 changes: 1 addition & 1 deletion mailpile/plugins/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def command(self):

# Behavior tracking
if 'tags' in config:
for tag in config.get_tags(type='replied'):
for tag in config.get_tags(type='fwded'):
idx.add_tag(session, tag._key,
msg_idxs=[m.msg_idx_pos for m in refs])

Expand Down
1 change: 1 addition & 0 deletions mailpile/plugins/setup_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Setup(Command):
# automatically added, and may be automatically removed as well
# to keep the working sets reasonably small.
'mp_rpl': {'type': 'replied', 'label': False, 'display': 'invisible'},
'mp_fwd': {'type': 'fwded', 'label': False, 'display': 'invisible'},
'mp_tag': {'type': 'tagged', 'label': False, 'display': 'invisible'},
'mp_read': {'type': 'read', 'label': False, 'display': 'invisible'},
'mp_ham': {'type': 'ham', 'label': False, 'display': 'invisible'},
Expand Down
6 changes: 3 additions & 3 deletions mailpile/plugins/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
'type': ['Tag type', [
'tag', 'group', 'attribute', 'unread',
# Maybe TODO: 'folder', 'shadow',
'drafts', 'blank', 'outbox', 'sent', # composing and sending
'replied', 'tagged', 'read', 'ham', # behavior tracking tags
'trash', 'spam' # junk mail tags
'drafts', 'blank', 'outbox', 'sent', # composing and sending
'replied', 'fwded', 'tagged', 'read', 'ham', # behavior tracking tags
'trash', 'spam' # junk mail tags
], 'tag'],
'flag_hides': ['Hide tagged messages from searches?', bool, False],
'flag_editable': ['Mark tagged messages as editable?', bool, False],
Expand Down

0 comments on commit 27eee42

Please sign in to comment.