summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
Commit message (Collapse)AuthorAge
* alot/commands/thread: Fix py3k issuesDylan Baker2018-03-01
|
* repalces uses of dict.iter* with non-iter versionsDylan Baker2018-03-01
| | | | | | | in python3 dict.{keys,items,values} return views, which are similar to iterators without some of the caveats about modifying the underlying object. The iter* and view* methods have been removed, instead one warps dict.x in iter or list to get those types.
* py3k: remove basestring and unicode.Dylan Baker2018-03-01
| | | | This probably isn't completely right, but it's a start.
* py3k: use StringIO from io module instead of cStringIODylan Baker2018-03-01
| | | | | cStringIO doesn't exist in python 3.x, instead one simply uses io.StringIO and python provided a C accelerated version if possible.
* Move screen stop/start logic into context manager.Thomas Nixon2018-02-19
| | | | | | | 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.
* Fix #1191, lockup after running external command.Thomas Nixon2018-02-19
| | | | | | | | This is caused by urwid/urwid#285; stopping and starting the whole mainloop rather than just the screen works around this, but that's only available in newer urwid versions. This also affected the :pipeto and :pyshell commands.
* add test for argparse validatorPatrick Totzke2017-11-08
|
* keep ThreadBuffer indentation non-negativePatrick Totzke2017-11-05
| | | | | | | | this makes sure that 'tbuffer._indent_width', which stores the requested indentation width, remains non-negative. As a consequence, multiple "decrease" operations on zero values can be reverted by a single "increase", as is intuitive.
* sanitize parameter for thread mode command 'indent'Patrick Totzke2017-11-05
| | | | | | this introduces a new argparse validation check that makes sure a parameter is '+', '-', or an integer, and uses this check for the 'indent' thread mode command.
* new thread buffer command 'indent'Patrick Totzke2017-11-05
| | | | to dynamically change the message indentation
* Merge branch 'master' into fix/spellingPatrick Totzke2017-09-02
|\
| * 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
|/
* 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 #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
* Copy tags to envelope with :editnewLucas Hoffmann2017-07-11
|
* 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.
* 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
| * | Add docstringLucas Hoffmann2017-01-25
| | |
| * | Use email.utils.formataddr when preparing headersLucas Hoffmann2017-01-25
| | |
* | | Fix missing self in staticmethod callLucas Hoffmann2017-01-25
|/ / | | | | | | Fix #1001
* / Turn local helper function into staticmethodLucas Hoffmann2017-01-24
|/
* make addresses unique in To headersPatrick Totzke2017-01-22
|
* clean up my address from Cc'sPatrick Totzke2017-01-22
|
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* fix odd continuation and indentationDylan Baker2016-12-27
| | | | This is just whitespace changes.
* Replace unused arguments with _Dylan Baker2016-12-21
| | | | | | | | | | This patch replaces a large number (but not all) unused arguments with the standard ``_`` placeholder. This has the advantage of signaling that these values are unused. There are a number of places that I've chosen not to apply this, largely in methods that have publicly define signatures that they inherit (usually from urwid).
* Replace map() and filter() with comprehensionsDylan Baker2016-12-21
| | | | | | | | This had the advantage of being more readable to people without a functional programming background, and it avoids the need to use lambdas which are both slow and have many corners in python. In a few cases it also allows us to use a generator expression instead of a materialized list, which save some memory.
* Use with blocks to write to temp filesLucas Hoffmann2016-12-18
|
* Merge pull request #885 from lucc/historyPatrick Totzke2016-12-15
|\ | | | | Save command line history across sessions
| * Expand history concept for sender and recipient of mailLucas Hoffmann2016-12-14
| |
* | Use native logging string interpolationLucas Hoffmann2016-12-14
| | | | | | | | This will also make the string interpolation lazy evaluated.
* | Fix import to be compatible with python 2.7 and 3Lucas Hoffmann2016-12-14
|/ | | | The lower case version is available since 2.5.
* Don't pass None as second argument of dict.get()Dylan Baker2016-12-13
| | | | This is the default value.
* Don't materialize with any()Dylan Baker2016-12-13
| | | | | It's more efficient to use a generator here than a list comprehension, since then we can avoid calculating addresses we don't need.
* Further minor style fixesLucas Hoffmann2016-12-09
|
* Clean up importsLucas Hoffmann2016-12-09
| | | | | | - use relative imports if possible - group imports into standard library, third party, and alot modules - sort imports alphabetically
* Use logging's native string interpolationLucas Hoffmann2016-12-09
|
* Merge pull request #752 from jkoelker/pipeto_field_keyPatrick Totzke2016-12-06
|\ | | | | Allow specifing the mailcap field key for `pipeto`