| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Bypasses the inspection of editor_cmdstring if it is still None after
all attempts to fill it. This will eventually lead to EditCommand.apply
erroring with 'no editor set' instead of alot crashing.
Fixes #1438
|
|
|
|
|
| |
Implements the suggestion in #1427 to display the actual error code, and
substitutes an empty stderr with "No stderr output".
|
|
|
|
|
|
|
|
| |
"Prefer plain text" should mean just that, and not "ignore HTML even in
the absence of a text part".
21c399ee ("Update to new (3.6) email message API", 2018-12-08) had
introduced the "ignore" behaviour. Make it "prefer" again.
|
|
|
|
| |
... instead of from alot.completion
|
|
|
|
| |
... to Completer.relevant_part
|
| |
|
| |
|
|
|
|
|
| |
This just splits the file completion.py into several files, one for each
Completer subclass.
|
| |
|
|
|
|
| |
The local variable proc was not defined in these branches.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
... in favour of get_body_text to de-clutter the Message class.
The functionality is implemented in alot.db.utils.extract_body, which
now contains the hard-coding of the html warning.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This uses email.message.EmailMessage.get_body() to find the best
candidate for a "body" message part and replaces our own ad-hoc solution
in alot.db.utils.extract_bodytext, which was based on a walk through all
parts.
|
|
|
|
| |
I don't think anyone needs anything else but copiousoutput here
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
email.utils.formataddr does more encoding than we need at this point -
headers will be encoded when they get inserted anyway.
Use db.utils.formataddr instead. Fixes #1378
Note that some tests need to be (and are) changed: The expectation of
the old tests was to get a completely escaped result.
Also, add an umlaut test.
|
|\
| |
| | |
Faster Thread loading
|
| |
| |
| |
| |
| | |
to make sure that all parts exist when messages are expanded
(see pydoc string)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will prevent the whole message from being read and interpreted
at the time we instantiate a MessageTree for display and instead only
create the (cheap!) summary widget.
When a user manually interacts with the Message widgets (for example by
unfolding/toggling source) then the content parts will anyway be
reassembled. The consequence of this patch is that loading large threads
should be much faster.
|
|/
|
|
|
| |
In addition, remove hardcoded default values from `account.py` and use
defaults from `alot.rc.spec`
|
|
|
|
|
| |
This moves the static methods clear_my_address and ensure_unique_address
out of ReplyCommand and into alot.db.utils.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
see issue #1402
If the "author" string (a decoded version of the From header value) is
read from the notmuch index, it may have already removed quotes around
real name parts containing a comma.
This means that `alot.db.message.get_author()` will potentially
misinterpret it because python's email libs decoding behaviour is
different.
For example, 'Ä, B <a@b.c>' will yield address 'Ä' and empty name!.
This commit makes sure that the original from header is read from disk
when one replies to a message, which avoids the above problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a local utility function `formataddr` which acts as the direct
inverse of `email.utils.parseaddr`.
The problem with `email.utils.formataddr` is (currently) that
- it encodes non-ascii characters and
- it does not re-introduce quotes around the real name parts in case
parseaddr removed them:
>>>parseaddr('"Ö, Ä" <a@b.c>')
>>>('Ö, Ä', 'a@b.c')
>>>formataddr(('Ö, Ä', 'a@b.c'))
>>>'=?utf-8?q?=C3=96=2C_=C3=84?= <a@b.c>'
>>>parseaddr('=?utf-8?q?=C3=96=2C_=C3=84?= <a@b.c>')
>>>('=?utf-8?q?=C3=96=2C_=C3=84?=', 'a@b.c')
related issue #1402
|
|
|
|
|
|
|
|
| |
Depending on the libmagic/ctypes version, magic_version is a function or
a constant. So far, the code expected a constant and fails on the
function variant with a TypeError.
Test with callable() und use the magic_version attribute accordingly.
|
|
|
|
|
|
| |
Python3 only supports "new-style" classes (those extending object),
and we don't need to explicitly inherit from this root class any more.
See http://pylint-messages.wikidot.com/messages:c1001
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when decoding headers containing email addresses;
Some MUAs (exchange) will add headers in the form:
To: "Last, First" <x@y.z>
Prior to this commit, alot would remove the quotes (apparently they
violate RFC 2047). However, this then would lead to problems where the
additional comma is interpreted as separator between several recipients.
This commit causes alot to not remove the quotes.
|
|
|
|
|
| |
Hotfix for double width characters causing columns misalign in search
view (https://github.com/pazz/alot/issues/1393)
|
|
|
|
| |
Closes #1391
|
| |
|
|
|
|
|
|
|
|
| |
Since this branch was created, master has diverged in that
ComposeCommand now stores the determined sender account in the envelope.
(see #117).
This commit makes sure that the newly split methods read the account from
there.
|
| |
|
|
|
|
| |
The last few functions are very small so just doe them in one go.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
account and From header
|
| |
|
|
|
|
|
|
|
|
| |
As we split the apply method up into separate methods we need a way for
those helpers to stop execution of the method. This wraps the real apply
method inside of a try/except block with a custom exception. Any helper
that is intended to run in the apply method simply needs to raise this
exception, and apply will return.
|
| |
|
|
|
|
|
|
|
|
|
| |
Tagstrings with double-width characters resulted in not enough
horizontal space being allocated, which lead urwid to draw the
statusline in two lines instead of one (see #742).
This lets urwid calculate the necessary width itself, using its pack()
method.
|
| |
|