summaryrefslogtreecommitdiff
path: root/alot
Commit message (Collapse)AuthorAge
* Merge pull request #1100 from pazz/docs-themingPatrick Totzke2017-08-04
|\ | | | | docs: mention 'content' part in threadline theming
| * docs: mention 'content' part in threadline themingPatrick Totzke2017-08-04
| | | | | | | | | | ... which displays a prefix of the msg contents. This feature was missing in the docs.
* | settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | | | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* | Fix message count in statusbar after taggingLucas Hoffmann2017-08-03
|/ | | | | | | | | | | | When the else branch was hit the count was already updated by SearchBuffer.rebuild() before the hitcount calculation was done and the final result was obviously off. This fixes it by just counting the messages in the search result directly. The same code is implicitly already called in the other branch of the if statement. So it is hopefully not a big overhead. Fixes #1098
* command/envelope: Prompt before sending an encrypted message with BccDylan Baker2017-07-27
| | | | | | | | | | | | | | | Currently alot cannot encrypt to Bcc recipients, and it isn't obvious how to implement encrypted BCC without a metadata leak (the key ids of the Bcc recpients would be visible to the to and cc recipients as well as the other bcc recipients). As such it hasn't been implemented yet (although #949) is opened for such encryption. In the mean time alot doesn't encrypt to bcc recipients at all, making the message all but useless (it might be useful to send it to yourself as a blind recipient, or to two email addresses of the same person). Since most people don't know that alot has this limitation, we should really warn them. This adds a prompt before constructing the message for that case.
* Merge pull request #1089 from dcbaker/submit/sign-without-hintDylan Baker2017-07-27
|\ | | | | commands/envelope: Fall back to account for signing key
| * settings/manager: Extend the get_account_by_address with return_defaultDylan Baker2017-07-27
| | | | | | | | | | | | This new return_default flag (which is an optional and default to False) will try to return the default account if it cannot find an account matching the address hint.
| * commands/envelope: Fall back to account for signing keyDylan Baker2017-07-19
| | | | | | | | | | | | | | If there isn't a key provided as an argument to sign or togglesign, fall back to using the account of the sending address to determine the key, otherwise the message will be marked as "to sign", but won't actually be signed. This is the same type of logic used for sign_by_default.
* | db/utils: Improve readabilityDylan Baker2017-07-24
| | | | | | | | | | Nested ternaries are awful to read, especially in this case. Putting it into an if statement is actually more terse, and is much easier to read.
* | db/utils: optimize if statementsDylan Baker2017-07-24
| | | | | | | | | | | | 1) dont use len() to test that a list is non-empty 2) only go down the else clause if it's possible to have a valid signature.
* | db/utils: Support unicode in signaturesDylan Baker2017-07-24
| | | | | | | | | | | | Currently if a signature name has a non-ascii unicode character in it, the thread will fail to load because a UnicodeEncodeError. This patch fixes that by converting the str into unicode.
* | Merge pull request #1085 from dcbaker/submit/system-theme-locationsDylan Baker2017-07-19
|\ \ | |/ |/| settings: Allow loading themes from system locations
| * settings: Allow loading themes from system locationsDylan Baker2017-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds additional system locations to search for theme files, which are either defined as the environment variable XDG_DATA_DIRS, or the generic fallback (per the xdg base directories spec) as /usr/local/share and /usr/share. We then add alot/themees to those paths to search for themes in. This allows a package manager to install the theme files system wide along with alot, and for alot to load them from the system wide directories. The Archlinux alot-git package is already installing the packages like this.
* | Merge pull request #1088 from dcbaker/submit/gpg-signed-no-newlineDylan Baker2017-07-18
|\ \ | | | | | | helper: Do not add a newline to the end of a signed section
| * | helper: Do not add a newline to the end of a signed sectionDylan Baker2017-07-17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spec is very clear here: (2) An appropriate Content-Transfer-Encoding is then applied; see section 3. In particular, line endings in the encoded data MUST use the canonical <CR><LF> sequence where appropriate (note that the canonical line ending may or may not be present on the last line of encoded data and MUST NOT be included in the signature if absent). That very last MUST NOT is what's important here, we shouldn't be adding newlines if they weren't there to begin with. Because we do it causes signed blobs that have newlines to be invalid since we've changed the substance of the signed code.
* / Exclude two methods from coverage reportLucas Hoffmann2017-07-17
|/ | | | | | | One is an abstract method anyways and the other one is trivial. It just calls two other functions that are already covered by tests. This results in 100% test coverage for alot/addressbook/*.
* crypto: Fix list_keys docstringDylan Baker2017-07-15
| | | | | | | | | There are currently several problems with this docstring: 1) it says the return type is list, but it's actually an iterator 2) it says the first parameter is keyid, but it's hint 3) no types are specified. This patch corrects that.
* crypto: Make strings more readableDylan Baker2017-07-15
| | | | | | | | | | This is a just a small refactor that makes things a little more readable, and provides slightly more verbose messages in for signing and encrypting failures. Mainly this uses str.format instead of inline concatenation, but it also rewraps and removes '+' operators from a string already wrapped in parens
* utils: Fix verifying signaturesDylan Baker2017-07-11
| | | | | | | | | To verify the signature correctly we need to ensure that the body of the message is decoded the same way as it was when it was signed, specifically using helper.email_as_string to insert \r\n instead of .as_string, which only inserts \n. Fixes #1079
* crypto: Fix error handling of signed messagesDylan Baker2017-07-11
| | | | | | | | | | gpgme.Context.verify doesn't raise an exception, instead it attaches the error as an attribute of the return value. This means that we've been returning that a signature is valid even when it isn't. This patch checks the attribute instead of try/excepting. Because there is a second bug (fixed in the next patch) signature verification will always fail with this patch.
* Copy tags to envelope with :editnewLucas Hoffmann2017-07-11
|
* Also save envelope tags with :saveLucas Hoffmann2017-07-11
|
* Display tags in envelope bufferLucas Hoffmann2017-07-11
|
* Add completion to new tag commandsLucas Hoffmann2017-07-11
|
* Add :tag commands in envelope buffersLucas Hoffmann2017-07-11
|
* Fix typo in docstringLucas Hoffmann2017-07-11
|
* Add a reload commandDylan Baker2017-07-10
| | | | | | | This command allows the configuration to be reloaded while alot is running. Fixes #1046
* settings: Add a reload methodDylan Baker2017-07-10
| | | | | | | | | | | This patch does a bit of refactoring to the Settings class for it's setup, and adds a reload method. The refactoring encapsulates the handling of NoneType for the read_*config methods, and reworks the constructor just a bit so that it doesn't rely on calling methods to create instance variables. The end result is slightly cleaner, and will be useful for adding a reload command to alot itself.
* Compile regex outside of for loopLucas Hoffmann2017-07-06
|
* Remove broad exceptLucas Hoffmann2017-07-06
| | | | | The protected code only calls re.match and list.append so it should never fail (and if it still fails it should not be silenced).
* Use stdlib functions in db.utils.encode_headerLucas Hoffmann2017-06-30
| | | | | | | Instead of manual parsing with regexp and manual string formatting the functions from email.utils are used. This fixes some small inconsistencies with addresses with empty realnames and with commas in realnames.
* determine_sender: replace complicated break logic by returnLucas Hoffmann2017-06-23
|
* Use account instead of realname to break loopsLucas Hoffmann2017-06-23
| | | | | | | | This fixes a bug in determine_sender where an account that did match but did not have a realname set was "not found" in case force_realname was set. Helped-By: Pol Van Aubel <dev@polvanaubel.com>
* Remember matched account explicitlyLucas Hoffmann2017-06-22
| | | | | Otherwise the next account in the for loop might have been returned if the account was found to match with its last alias.
* Extend docstringLucas Hoffmann2017-06-21
|
* Remove magic constantLucas Hoffmann2017-06-21
|
* add BSD 3 point licence to werkzeug-helperPatrick Totzke2017-06-17
|
* conservative lookup of sub-completersPatrick Totzke2017-06-15
| | | | via cached properties
* Merge pull request #1063 from lucc/tests/abookDylan Baker2017-06-09
|\ | | | | tests for addressbook classes
| * Correct membership testLucas Hoffmann2017-06-08
| |
* | Exclude search.exclude_tags from searchesJohannes Löthberg2017-06-08
|/ | | | | | Fixes #707 and #332. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Merge pull request #1061 from lucc/tests/settings-managerLucas Hoffmann2017-06-08
|\ | | | | add some first tests for settings.manager.SettingsManager
| * Extend docs for settings.utils.read_configLucas Hoffmann2017-06-06
| | | | | | | | | | The argument is handed to ConfigObj directly and allowing lines of text to be passed here makes future tests much easier.
* | account: Don't assume that self.aliases is setDylan Baker2017-06-07
|/ | | | | | Currently this code works because alot always populates aliases so it's not None, but if for some reason it doesn't then get_addresses will assert.
* don't select "yes" on returnPatrick Totzke2017-06-05
|
* Merge pull request #1038 from pazz/removeDylan Baker2017-05-05
|\ | | | | fix #1036
| * fix #1036Patrick Totzke2017-02-22
| | | | | | | | | | This prevents the threadbuffer to look up a nonexistent focussed message if the thread is empty (e.g. after removal of the last msg).
* | Revert "Remove getter for alot.walker.PipeWalker.lines"Lucas Hoffmann2017-03-01
| | | | | | | | This reverts commit 488d843082600928902cf4cbd442f1545a0a8c59.
* | Revert "Turn alot.walker.PipeWalker.focus into a property"Lucas Hoffmann2017-03-01
| | | | | | | | This reverts commit 237499e631741dbb3837e5ef99cc66f842e8a92e.
* | Mention "public" attributes in class docstringLucas Hoffmann2017-02-26
| |