diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-07-09 23:42:38 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-07-11 20:58:34 +0200 |
commit | a91c905276b1a484f57b0b933cbc42ba61fcbbae (patch) | |
tree | d89af97f1a9cd45089e629913b2b93e60ad17194 /alot | |
parent | 2dc1e644c3db65b575761b077c54aacd42d5e8ce (diff) |
Copy tags to envelope with :editnew
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/thread.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 8f1ae039..ce5da649 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -489,9 +489,14 @@ class EditNewCommand(Command): if not self.message: self.message = ui.current_buffer.get_selected_message() mail = self.message.get_email() + # copy most tags to the envelope + tags = set(self.message.get_tags()) + tags.difference_update({'inbox', 'sent', 'draft', 'killed', 'replied', + 'signed', 'encrypted', 'unread', 'attachment'}) + tags = list(tags) # set body text mailcontent = self.message.accumulate_body() - envelope = Envelope(bodytext=mailcontent) + envelope = Envelope(bodytext=mailcontent, tags=tags) # copy selected headers to_copy = ['Subject', 'From', 'To', 'Cc', 'Bcc', 'In-Reply-To', |