summaryrefslogtreecommitdiff
path: root/alot
Commit message (Collapse)AuthorAge
* ui: Drop unneeded _error_handler and rename _error_handler2Dylan Baker2018-07-26
| | | | | | The "2" version was used in non-twisted contexts, now that we don't use twisted we can drop this and rename the "2" variant to the normal variant.
* Drop all use of twisted!Dylan Baker2018-07-26
| | | | | This moves the actual event loop to be the default asyncio eventloop instead of the twisted reactor.
* ui: make apply_commandline a coroutineDylan Baker2018-07-26
| | | | | | This patch is sketchy, it makes the UI start up slowly, and it breaks in a bunch of cases where it get's defereds but asyncio doesn't expect that.
* ui: switch ui.prompt and ui.choice to use asyncio.FuturesDylan Baker2018-07-26
| | | | | | | | | | | asyncio's Futures are much like twisted's Deferreds, they represent a value that is not yet available, and they can be awaited like a coroutine. For the moment we still need to return a deferred because the twisted eventloop doesn't use Futures, it uses Deferreds; once we can remove twisted's eventloop we can remove the conversion from a Future to a deferred.
* ui: Convert apply_command to a coroutineDylan Baker2018-07-26
| | | | | | This is a pretty invasive patch, since the ui code is used so extensively, it requires going into a lot of other code and converting those to coroutines, since before they returned deferred's.
* ui: convert the loop_hook to asyncioDylan Baker2018-07-26
| | | | | | asyncio doesn't have a loopingCall helper, so I've implemented a coroutine that does the same thing, it takes a callable, a period, and then forwards all other arguments. This is tested and working.
* command/envelope: Don't use a deferred, use awaitDylan Baker2018-07-26
|
* account: Convert send_mail function to coroutineDylan Baker2018-07-26
|
* helper: use asyncio.subprocess instead of twistedDylan Baker2018-07-26
|
* db/manager: use threads instead of reactor.callInThreadDylan Baker2018-07-26
| | | | | This is the obvious thing to do, and it works, but it does introduce some latency into starting alot.
* buffers/search: add missing NotmuchErrorDylan Baker2018-07-26
| | | | Found due to another bug :)
* commands/globals: implement ExternalCommand.apply as coroutineDylan Baker2018-07-26
| | | | | | Rather than returning a deferred in some cases, this makes the function a coroutine, in some cases it calls regular subprocess, in other cases it uses asyncio subprocess.
* commands/thread: Use asyncio coroutines instead of twisted deferredsDylan Baker2018-07-26
|
* commands/globals: Use asyncio coroutines instead of twisted deferredsDylan Baker2018-07-26
|
* command/envelope: use asyncio coroutines instead of twisted inlineCallbacksDylan Baker2018-07-26
|
* ui: Handle asyncio coroutines in call_cmdDylan Baker2018-07-26
| | | | | | This allows twisted deferred's (which is all an inlineCallback actually is) to be mixed with asyncio coroutines (async def), by wrapping them in a special twisted function for handling asyncio coroutines.
* Use twisted reactor as asyncio event loopDylan Baker2018-07-26
| | | | | | | | This puts the twisted event loop into the asyncio framework. This means that we're currently running all over our twisted.defered's and twisted.inlineCallbacks through asyncio, using the twisted loop. This will allow incremental updates from twisted's event loop to a standard asyncio event loop.
* commands/envelope: check that self.envelope is not NoneDylan Baker2018-07-26
| | | | | | If the mail is passed a string then envelope will always be None. There is one case in the final callback where self.envelope is assumed set, but it isn't guaranteed to be, so guard that properly.
* Merge pull request #1276 from alexshpilkin/copyeditDylan Baker2018-07-25
|\ | | | | Copyedit documentation
| * Describe options the same way in help and manualAlexander Shpilkin2018-07-25
| | | | | | | | | | The descriptions of --help and --version are the same as used in e.g. GNU coreutils (different from the Python default).
| * Reword description of options -C and colourmodeAlexander Shpilkin2018-07-25
| |
| * Avoid abbreviations in documentationAlexander Shpilkin2018-07-25
| |
| * Capitalize option and command descriptions consistentlyAlexander Shpilkin2018-07-25
| |
| * Fix typo in description of option -dAlexander Shpilkin2018-07-25
| |
* | commands/globals: Convert Address to string for email.utilsDylan Baker2018-07-25
|/ | | | | | | | Email utils apparently assumes it's getting a string, and calls encode directly. This can only be hit if you have a single account configured, not with multiple accounts. Fixes #1277
* Merge pull request #1256 from pazz/namedqueriesDylan Baker2018-07-24
|\ | | | | New buffer type for notmuch's named query strings
| * add completion for named queriesPatrick Totzke2018-07-24
| | | | | | | | | | | | | | | | This adds a Completer which looks up and completes the alias strings of named queries. Also in this commit the QueryCompleter (which helps building valid query strings in prompts) is extended to make use of the new Completer.
| * add global command 'removequery'Patrick Totzke2018-07-24
| | | | | | | | that removes a named query string from the notmuch index
| * new command "savequery"Patrick Totzke2018-07-24
| | | | | | | | | | | | ...that stores a query string as named search. in Search buffers, this will fall back on the current search string unless a full query string is provided as (second) argument.
| * add setter for (notmuch) configs to database managerPatrick Totzke2018-07-24
| | | | | | | | these can be used to define/remove new named query strings
| * add default binding for namedqueries bufferPatrick Totzke2018-07-24
| |
| * add config option to configure the statusbarPatrick Totzke2018-07-24
| | | | | | | | ... in new namedqueries buffer
| * update theme spec, default theme and testsPatrick Totzke2018-07-24
| | | | | | | | | | | | | | | | | | | | This patchseries adds a new buffer type for displaying notmuch's saved querystrings. This commit adds the respective theming attributes used in the new buffer. They are just copies of the taglist buffer really. THIS BREAKS COMPATIBILITY WITH USER THEMES! The theme files need to be updated to also have these new attributes in order to conform with the updated spec.
| * add new buffer type NamedQueriesBufferPatrick Totzke2018-07-24
| | | | | | | | that displays the named query strings stored in the notmuch database
| * add text widget used in namedqueries buffersPatrick Totzke2018-07-24
| |
| * add select command for namedqueries bufferPatrick Totzke2018-07-24
| |
| * add global namedqueries commandPatrick Totzke2018-07-24
| | | | | | | | ... that opens a new namedqueries buffer
| * expose namedquery command to CLIPatrick Totzke2018-07-24
| |
| * add getter for named queries to DB managerPatrick Totzke2018-07-24
| |
* | deal with cases where part widget can be NonePatrick Totzke2018-07-24
| | | | | | | | | | this is only possible for "tags" parts, in case the list of tags is empty or all tags are hidden.
* | determine min/max width and alignment when usedPatrick Totzke2018-07-24
| | | | | | | | | | .. from the theming structure, instead of pushing these as extra parameters through helper functions.
* | further break down threadline.build_text_partPatrick Totzke2018-07-24
| | | | | | | | | | into several small functions that prepare the content string for their respective part of a threadline.
* | widgets/search: Don't try to sort an iteratorDylan Baker2018-07-24
| | | | | | | | | | | | We currently call dict_keys.sort(), which doesn't work because it doesn't exist. The whole function is kinda strange anyway, since there's a lot of work done in general that only applies in once case.
* | refactor widgets.search.ThreadlinePatrick Totzke2018-07-24
| | | | | | | | | | | | | | | | | | This factors out the method _build_part, which is used to create local Text/Column widgets for each indivitual part of the threadline. The method is now broken in two: one for text (= subject, authors,..) parts and one for tags (= Columns of TagWidgets) and both those functions are moved out of the Threadline class.
* | remove unused static methodPatrick Totzke2018-07-24
| | | | | | | | This was superseeded by settings.get_threadline_theming a while back
* | refactor threadline widgetPatrick Totzke2018-07-24
| | | | | | | | | | this simplifies the rebuilding of alot.widgets.search.Threadline, removes duplicate and ugly code.
* | fix wide characters in search modePatrick Totzke2018-07-24
|/ | | | | | | | | | this will cause the width of a (author/tag/..) string in a threadline widget to be computed by urwids `Widget.pack` function rather than just taking the length of the string. This fixes an issue with utf-8 wide characters such as Kanji, fow which urwid needs extra space, and consequently adds additional rows when packing such Textwidgets into Columns as we do in threadlines.
* Merge pull request #1252 from pazz/update-envelope-keysDylan Baker2018-07-24
|\ | | | | fix: automatically update envelope gpg keys only if requested. see #1228
| * update gpg keys only if envelope asks for encryptionPatrick Totzke2018-06-21
| | | | | | | | | | | | | | This prevents the update of the gpg keys stored in an envelope, triggered by a header change, in case envelope.encrypt is set to false. Fixes the issue that I reported on #1228
| * rename function that updates gpg keys in envelopesPatrick Totzke2018-06-21
| |