| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
- SettingsManagers is now instantiated without config paths
and instead `read_[notmuch]config` is called separately
- test_no_user_setting_* are removed, because we do not need to test
what config path SettingsManager uses anymore (this is now explicit)
|
|
|
|
| |
They are not needed for python >= 3.0.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit d01d2e51da45dd87f0abf98b8a856f3b3de69153.
I don't think that this patch really improved readability that much. The
right solution is to split ComposeCommand.apply so we don't need so many
mocks.
|
| |
|
| |
|
| |
|
|
|
|
| |
This allows writing less-nested statements.
|
|
|
|
|
|
|
| |
I had made the assumption early on that this would get bytes, but when I
added `assert isinstance(header, bytes)` alot would crash on startup,
changing `bytes` to `str` fixed that. I noticed this when trying to fix
the warning generated in the logging call.
|
|
|
|
|
|
| |
We don't want to be comparing bytes anyway, the decode would use utf-8,
and that isn't right. Instead make the caller convert to a str of
Address first.
|
|
|
|
|
| |
Commands running in a subprocess should return the terminal encoding so
we don't need to guess their encoding.
|
|
|
|
|
| |
Which compares that the lists have the same elements, but doesn't check
their order.
|
| |
|
| |
|
|
|
|
|
| |
There are a few that are still broken because of bytes to unicode
conversion, and this may not all be correct, but most of the tests pass
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The crypto code shouldn't use unicode strings, it should use byte
strings. The problem with using unicode strings (and doing the
conversion internally), is that the crypto code doesn't know what the
encoding should be. We can guess but it's better to just do bytes in
bytes out, and let the calling code deal with encoding and decoding.
|
|
|
|
|
|
| |
This makes me a little nervous. I wonder if we're better off leaving the
bits that gpg works with as bytes while gpg is working with them and do
the string transformation later.
|
| |
|
|
|
|
| |
In python 3 xrange is range, to get a list one must wrap range in list.
|
|
|
|
|
|
|
| |
As well as reducing duplication and adding screen size detection to
:pipeto and :pyshell, this ensures that the screen is always restarted,
resulting in cleaner error handling if an error occurs while the screen
is stopped.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- allows users to use $XDG_CONFIG_HOME, as well
- stores information in single places.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use fallback, if an enviroment variable is unset *or* empty.
Bug:
- XDG_CONFIG_HOME='' alot
Problem:
Does not find the configuration file (among others), because
os.environ.get('XDG_CONFIG_HOME', '~/.config') returns '', instead of
'~/.config'.
|
| |
|
| |
|
|
|
|
|
| |
The code doesn't need the context manager to be active, hence it can run
outside of the with block.
|
|
|
|
|
| |
This makes it possible to silence the test output with normal unittest
settings (e.g. command line parameters).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the following crashes:
1. tag completion with regex special chars
:search tag:[<tab>
2. Changing tag representation of an (existing) tag with regex special
chars:
[tags]
[[my**tag]]
normal = '','', 'white','light red', 'white','#d66'
3. Contact completion with regex special chars and no external command:
To:**foo<tab>
|
| |
|
| |
|
| |
|
|
|
|
| |
This makes drafts display correctly.
|
|
|
|
|
|
|
| |
If the message doesn't have a sender, try to come up with one. If the
message has the draft tag we known that the user is the sender, just use
the default account as the from if we can't find one another way. If it
doesn't have the draft tag just set the sending to 'Unknown'.
|
|
|
|
|
| |
These are just enough to look at the bug that will be fixed in the
patches that follow.
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a try/except because comparing an address to an empty string
should be a fairly uncommon event and try/except will be faster than
`if '@' not in other` in the case where '@' is in other.
This stops alot from crashing if there is no 'From' header in the
email. Outlook generates drafts without a 'From' header.
Fixes #1050
|
| |
|
|\
| |
| | |
Handle servers that treat the user segment of an address as case insensitive
|
| |
| |
| |
| |
| |
| |
| | |
This just wries the new Address class into alot for use, and fixes up a
few places where such fixups are needed.
Fixes #1107
|