Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | db/manager: support flexible database location | Anton Khirnov | 2022-02-05 |
| | | | | | In newer notmuch versions it no longer needs to be stored along with the emails themselves. | ||
* | helper: move guess_mimetype into its own file | Anton Khirnov | 2021-11-24 |
| | |||
* | mail/reply: rewrite recipient selection | Anton Khirnov | 2021-11-24 |
| | | | | | | | | Thoroughly ensure that To+Cc contains neither our own address (except when it is wanted) nor any duplicates. Use structured headers provided by email.headerregistry to simplify dealing with addr-spec vs. mailbox (display name + <addr-spec>). | ||
* | mail: add a custom email policy | Anton Khirnov | 2021-11-24 |
| | | | | Uses structured parsing for more headers. | ||
* | utils/mailcap: fix filename handling | Anton Khirnov | 2021-11-20 |
| | | | | | It is only relevant for the sanitize_attachment_filename hook, so never got triggered. | ||
* | db/message: work around python bug 39100 | Anton Khirnov | 2021-11-20 |
| | |||
* | db/message: do not assume all messages have a 'from' header | Anton Khirnov | 2021-06-07 |
| | |||
* | db/message: make sure attachment data is always a byte sequence | Anton Khirnov | 2021-05-15 |
| | | | | Encode text strings to UTF-8 and set the charset parameter accordingly. | ||
* | db/message: apply _fixup_charset() to attachments as well | Anton Khirnov | 2021-05-15 |
| | |||
* | db/message: override missing content-type charset to utf-8 | Anton Khirnov | 2021-05-15 |
| | | | | | Strictly speaking it should be inferred to be us-ascii when missing, but utf-8 is a safer (and compatible) choice. | ||
* | db/message: stop loading the email in the constructor | Anton Khirnov | 2021-05-13 |
| | | | | | | | The last bit of code in the constructor accessing the email was the chunk parsing the author. Move it to the author accessor, and also make it use the 'From' header value loaded from the Notmuch message (which is stored in the database). | ||
* | db/message: turn _email and body into cached properties | Anton Khirnov | 2021-05-13 |
| | | | | | Does not really change much for now, since the email is still loaded in the constructor, but will allow optimization later. | ||
* | db/message: remove get_email() | Anton Khirnov | 2021-05-13 |
| | | | | | It has no more callers left. The email object should no longer be accessed directly. | ||
* | commands/thread:ReplyCommand: use the message headers object for building reply | Anton Khirnov | 2021-05-13 |
| | |||
* | commands/thread: use the headers object for building reply subject | Anton Khirnov | 2021-05-13 |
| | |||
* | db/manager: optimize database modifications | Anton Khirnov | 2021-03-18 |
| | | | | | | | Add only tags that are not present on the message, remove only tags that are present. Otherwise the no-op modification results in an actual db write, even though nothing changes. | ||
* | widgets/search: display the number of matching messages in the thread | Anton Khirnov | 2021-02-10 |
| | |||
* | db/message: handle text MIME with invalid charsets | Anton Khirnov | 2021-02-08 |
| | |||
* | commands/search: refactor applying the tag command | Anton Khirnov | 2021-02-07 |
| | | | | Apply toggle as a single db write rather than two. | ||
* | db/manager: rewrite db write operation API | Anton Khirnov | 2021-02-07 |
| | | | | Allows to apply multiple operations together as a single unit. | ||
* | db/manager: use only one worker thread for write operations | Anton Khirnov | 2021-02-05 |
| | | | | | There is no point in having more, as the database cannot have more than one writer at any moment. | ||
* | buffers/search: fix handling malformed queries | Anton Khirnov | 2021-01-31 |
| | |||
* | db: use symbolic constants for sort orders | Anton Khirnov | 2021-01-31 |
| | |||
* | db: drop unused module-level imports | Anton Khirnov | 2021-01-30 |
| | |||
* | db/manager: handle notmuch exceptions in count_* | Anton Khirnov | 2021-01-30 |
| | |||
* | db/attachment: move to mail/ | Anton Khirnov | 2021-01-30 |
| | | | | It has nothing whatsoever to do with the database. | ||
* | db/attachment: simplify the Attachment class | Anton Khirnov | 2021-01-30 |
| | | | | | Make it a plain container around raw data and a few bits of metadata, rather than around a whole MIME part. | ||
* | db/envelope: move to a new module "mail" | Anton Khirnov | 2021-01-30 |
| | | | | It has nothing to do with the database. | ||
* | db/envelope: switch to the "new" (EmailMessage) python API | Anton Khirnov | 2021-01-30 |
| | | | | | | | | | | email.mime is a part of the old API, which does not mix well with the new one (i.e. when email.policy.SMTP is used), specifically when non-ASCII headers are used. Additionally, clean the APIs that accept either EmailMessage or a str to only expect EmailMessage. Supporting both just adds confusion and complexity. | ||
* | helper: move mimewrap() to the only place where it is called | Anton Khirnov | 2021-01-26 |
| | |||
* | db/message: use DEVNULL stdin when there is no input | Anton Khirnov | 2021-01-26 |
| | | | | Avoid the child grabbing our stdin. | ||
* | Rewrite mailcap handling. | Anton Khirnov | 2021-01-26 |
| | | | | | | | | | | | Add a class that encapsulates the handler and is responsible for managing the temporary file, if one is needed. Use this class for both rendering inline content and displaying attachments externally. External attachments are now wrapped in an asyncio task that is added to a pool of tasks managed by ui. | ||
* | db/manager: fix signature of Database.add() | Anton Khirnov | 2021-01-24 |
| | |||
* | db/message: make sure not to leave temporary files around | Anton Khirnov | 2021-01-21 |
| | | | | | Use a contextlib.ExitStack to remove the temporary file used by external handler, even if an exception is raised. | ||
* | db/message: split _render_part() | Anton Khirnov | 2021-01-21 |
| | | | | | | | | Rename it to _render_part_external() and make it only handle external rendering. Move the other code - dealing with text parts without an external handler - to _MimeTree.render_str(). This takes into account overridden content types, and also processes text/plain parts if that is configured. | ||
* | db/message: pass content-type to _render_part() | Anton Khirnov | 2021-01-21 |
| | | | | | Do not get it from the underlying EmailMessage, since we may override it. | ||
* | db/message: implement __str__ | Anton Khirnov | 2021-01-21 |
| | |||
* | db/message: guess a better content type for octet-stream parts | Anton Khirnov | 2021-01-21 |
| | | | | Same as what is done for Attachment. | ||
* | widgets/thread: generic pygments highlighting | Anton Khirnov | 2021-01-21 |
| | |||
* | db/message: fix email-missing warning | Anton Khirnov | 2021-01-21 |
| | |||
* | buffers: make get_info() asynchronous | Anton Khirnov | 2021-01-20 |
| | | | | | Allows computing message/thread counts asynchronously in a separate thread. | ||
* | db/thread: add parentheses for chaining queries | Anton Khirnov | 2021-01-20 |
| | |||
* | db: make sure to close the read-only database instances | Anton Khirnov | 2021-01-20 |
| | |||
* | db: make write operations async | Anton Khirnov | 2021-01-20 |
| | |||
* | db/manager: drop unused variable | Anton Khirnov | 2021-01-19 |
| | |||
* | helper: move humanize_size to the only place where it is used | Anton Khirnov | 2021-01-16 |
| | |||
* | helper: rewrite mailto_to_envelope/parse_mailto to Envelope.from_mailto | Anton Khirnov | 2021-01-16 |
| | |||
* | db/message: export headers per-MIME part | Anton Khirnov | 2021-01-15 |
| | |||
* | db/message: passthrough text parts if there is no handler | Anton Khirnov | 2021-01-13 |
| | |||
* | db/manager: Drop async method | Dylan Baker | 2021-01-10 |
| | | | | | | | | | | As far as I can tell using a separate process doesn't actually improve performance, it makes it worse. The work that we're passing off to the separate function isn't necessarily work that's well suited to being handed off, there isn't a lot of computation and the objects that need to be passed across the pipe are fairly large (at least when considering a pipe). Converting the function to a generator gives better performance and simplifies the implementation. |