summaryrefslogtreecommitdiff
path: root/alot/commands
Commit message (Collapse)AuthorAge
* Merge branch 'master' into fix/spellingPatrick Totzke2017-09-02
|\
| * pep8 fixesPatrick Totzke2017-09-01
| | | | | | | | | | This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
| * Use new Address classDylan Baker2017-08-28
| | | | | | | | | | | | | | This just wries the new Address class into alot for use, and fixes up a few places where such fixups are needed. Fixes #1107
* | Fix some spelling mistakesLucas Hoffmann2017-09-02
|/
* commands/globals: Only set stdin to a pipe if there is dataDylan Baker2017-08-23
| | | | | | | | | | Otherwise the editor will crash. I can't figure out for the life of me to test this. I thought that I would be able to do something like detect if stdin is a tty or something else, but that doesn't seem to work. Fixes #1137
* command/globals: Test for not None rather than callableDylan Baker2017-08-23
| | | | | | If someone passes us something other than None or a callable they're abusing the API. Instead, use is not None, and let the code except if something else is passed.
* commands/globals: Simplify ExternalCommand thread_CodeDylan Baker2017-08-23
| | | | | | This simplifies the code but not using an if/else, but to just use a ternary to set the input to Popen.communicate. This also pulls some code out of the try/except block that isn't being tried.
* commands/globals: spelling and grammar of a commentDylan Baker2017-08-22
| | | | It's just a little off
* Merge pull request #1126 from lucc/py3/py2-compatibleDylan Baker2017-08-22
|\ | | | | Some small changes that are py2 and py3 compatible
| * py3k: Use logging.warning instead of warnLucas Hoffmann2017-08-20
| | | | | | | | | | The short version is deprecated as of python3. Both are available in both python versions.
* | Use io.BytesIO and io.StringIODylan Baker2017-08-19
| | | | | | | | | | | | | | | | In python3 StringIO and cStringIO are gone. In their place are io.BytesIO and io.StringIO. They are somewhat different in that they are not separated on implementation, but on the type they emulated. BytesIO works like the bytes class (str in python 2), while StringIO works like the str class (unicode in python2).
* | Replace Exception.message with str(Exception)Dylan Baker2017-08-19
|/ | | | | | In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
* Merge pull request #1115 from pazz/fix-account-selectionDylan Baker2017-08-17
|\ | | | | Fix issue with account selection
| * let SendmailAccount.send_mail cast the mail to strPatrick Totzke2017-08-16
| | | | | | | | | | | | instead of assuming that it already receives a string. The new behaviour is in sync with the type documented for the superclass `Account`.
| * send complete addresses to settings.get_account_by_addressPatrick Totzke2017-08-16
| | | | | | | | | | .. as read from the From-header directly, potentially including realname parts.
* | alot: replace email.Utils with email.utilsDylan Baker2017-08-16
|/ | | | | In python 3 email.Utils doesn't exist, in python 2.7 both do, but Utils is deprecated.
* just use the OpenPGP fingerprint instead of inventing "hash_key"Daniel Kahn Gillmor2017-08-14
|
* convert from pygpgme to the python "gpg" moduleDaniel Kahn Gillmor2017-08-14
| | | | | | | | | | | | | | | This converts from the now abandoned pygpgme project for wrapping gpgme, to the upstream gpgme python bindings (which are descended from the pyme project, before they became official). Largely this change should not be user visible, but there are a couple cases where the new bindings provide slightly more detailed error messages, and alot directly presents those messages to users. This patch has been significantly revised and updated by Dylan Baker, but was originally authored by Daniel Kahn Gillmor. Fixes #1069
* Merge pull request #1111 from dcbaker/submit/signcommand-testsDylan Baker2017-08-14
|\ | | | | Fix issue 1113
| * envelope: Allow signing if address is in "name <email>" formDylan Baker2017-08-11
| | | | | | | | | | | | | | | | | | Currently anything except "user@domain" (such as "User Name <user@domain>"), will not work with the sign command, because settings.get_account_by_address wants just the "user@domain" bit, and we don't split it. Fixes #1113
* | commands: Don't try to sign_by_default without a gpg keyDylan Baker2017-08-11
|/ | | | | | Currently it's possible to set sign_by_default without setting a default key. This is obviously not a good plan for all sorts of reasons. This fixes the two failing tests from the last commit.
* Merge pull request #988 from lucc/move-next-matchingLucas Hoffmann2017-08-07
|\ | | | | Add `move next matching` command in thread buffer
| * docs: Update docstrings for move commandsLucas Hoffmann2017-08-05
| |
| * Interpret unrecognized movements as search termsLucas Hoffmann2017-08-05
| | | | | | | | | | | | The move command in thread buffers can recognize some predefined targets to move to. All other arguments are interpreted as notmuch queries and the next or previous matching message is moved to.
* | Format class decoratorsLucas Hoffmann2017-08-04
|/
* 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.
* 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.
* 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 :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
* 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.
* Exclude search.exclude_tags from searchesJohannes Löthberg2017-06-08
| | | | | | Fixes #707 and #332. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* don't select "yes" on returnPatrick Totzke2017-06-05
|
* Convert gpg uid choices into a listRuben Pollan2017-02-08
| | | | reversed doesn't work with generators
* commands: Use a sphinx code-blockDylan Baker2017-01-31
|
* commands/envelope: remove unreachable codeDylan Baker2017-01-31
| | | | | | | As the comment suggests this path is effectively unreachable. We have a work around because path is allowed to be None, but we don't want to handle that case. This patch forces path to be provided (which argparse will do), and then removes the unreachable else path.
* commands/globals: use __future__ divisionDylan Baker2017-01-27
| | | | | | This imports division from __future__, and changes the one use of division to integer division, since it's for calculating how many lines to move the cursor.
* Merge pull request #1000 from dcbaker/pr/argument-validatorLucas Hoffmann2017-01-27
|\ | | | | argparse validators
| * Move utils/booleanaction.py to utils/argparse.pyDylan Baker2017-01-25
| | | | | | | | | | This module is going to be enhanced with additional components in later patches in this series, so it needs a more generic name.
* | Fix bug when replying to allLucas Hoffmann2017-01-25
| | | | | | | | | | | | | | | | The bug and fix were found by @josch. One needs to set `honor_followup_to = True` and `followup_to = True` to trigger the bug. See #874 for more info. The bug was probably introduced in 2c85e7322f7a060309ee83e5906c731d3d8f5da6.
* | Fix typo in commentLucas Hoffmann2017-01-25
| |
* | Merge pull request #993 from lucc/quotes-in-namesPatrick Totzke2017-01-25
|\ \ | | | | | | [RFC] Fix addressbook completion