summaryrefslogtreecommitdiff
path: root/alot
Commit message (Collapse)AuthorAge
...
| * 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
| |
* | Respect colour mode set in config fileAlexander Shpilkin2018-07-22
| | | | | | | | | | | | Terminal colour mode can be set both in the config file and on the command line, but a default value for the command-line option overrode whatever was specified in the config file. Fix this.
* | widgets/globals: inverse search keys (up/down)Dylan Baker2018-07-18
| | | | | | | | | | | | This has really annoyed me for a while, the search is reversed from vim. In alot currently up is older searches, whiles down is newer. In vim it's reversed.
* | Merge pull request #1266 from mjg/message-from-bytesDylan Baker2018-07-17
|\ \ | | | | | | Message from bytes
| * | use email.message_from_bytesMichael J Gruber2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | .. instead of homebrew method `db.utils.message_from_bytes`. The right way to do this is to rely on the direct bytes->message conversion provided by pythons email module. cf #1253 Suggested-by: Patrick Totzke <patricktotzke@gmail.com>
| * | rename message_from_ functionsMichael J Gruber2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our message_from_functions decrypt PGP encryped parts in addition to creating a message object (from bytes or file handles) and recognizing the encoding in one way or the other. Rename them before refactoring to make their function clearer and to distinguish them from the email.message_from_ functions (which do not decrypt).
| * | Revert "require chardet"Michael J Gruber2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0b5f8bf143e76be7ac989e8c8ec6e4a7dc08a78a. Chardet takes prohibitively long on large blobs (such as attachments). It will be replaced by functions from the email module in subsequent commits.
* | | alot/helper: parse_mailto: unquote is in urllib.parse in Python 3Johannes Löthberg2018-07-16
| | | | | | | | | | | | Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* | | ComposeCommand: open signature as binaryJohannes Löthberg2018-07-12
|/ / | | | | | | | | | | | | Otherwise it will be read as a regular python string and be interpreted as octet-stream. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* | Merge pull request #1222 from mjg/thread-retagpromptPatrick Totzke2018-06-23
|\ \ | | | | | | provide retagprompt command in thread mode
| * | provide retagprompt command in thread modeMichael J Gruber2018-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | retagprompt in search mode allows to retag a whole thread. The new thread mode version allows to do the same for each selected message. The common command infers its mode from the UI object that it is passed when applied. Therefore, the docstring (and everything else) is mode-agnostic. When this command command is registered for the wrong mode and applied it raises a KeyError (on purpose).
| * | refactor common retagpromptMichael J Gruber2018-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new source file common.py for common commands and, as a first example, define RetagPromptCommand there and register it from search.py. This shows how to "decorate" a class that is defined somewhere else, and thus how to decorate it multiple times.
* | | add missing importPatrick Totzke2018-06-22
|/ / | | | | | | | | .. that accidentally got dropped during c86623d9c7daaa2f9a832135a11870a0d91110a3 This fixes #1255
* / lazy reading of config files in SettingsManagerPatrick Totzke2018-06-21
|/ | | | | | | | | This prevents SettingsManager from reading the config files right when it is isntantiated and instead waits for the main module to call `read_[notmuch]config` with the right path. This should prevent problems with accidentally reading the default config paths despite being told otherwise (via commandline options)
* Merge pull request #1228 from dcbaker/auto-encrypt-newPatrick Totzke2018-06-19
|\ | | | | envelope: Update encryption keys when CC, To, or From is changed
| * envelope: Update encryption keys when CC, To, or From is changedDylan Baker2018-03-12
| | | | | | | | | | | | | | | | | | | | | | | | Currently the encryption keys will only be updated when they are toggled, which means that if you change a Cc or To then the keys encrypted to might be wrong, either too many keys will be encrypted to, or not enough, or just the wrong ones. This patches fixes this by calling set_encrypt whenever the 'To', 'Cc', or 'From' headers are changed by set or unset. Fixes #1227
* | remove deprecated future importsPatrick Totzke2018-06-19
| | | | | | | | see also #1250
* | refactor buffersPatrick Totzke2018-06-19
| | | | | | | | | | This splits buffers.py, which contained all buffer classes, into several smaller files. issue #1226
* | Merge branch 'master' into futurePatrick Totzke2018-06-19
|\ \
| * | use importlib to load hooks code at startupPatrick Totzke2018-06-19
| | | | | | | | | | | | imp is deprecated in favor of importlib.
* | | Remove old __future__ importsLucas Hoffmann2018-06-19
|/ / | | | | | | They are not needed for python >= 3.0.
* | fix encoding issue in thread.PrintCommandPatrick Totzke2018-06-18
| | | | | | | | fixes #1244
* | db/utils: remove unused importDylan Baker2018-05-15
| |
* | alot/helper: allow call_cmd to take bytes or strings as stdinDylan Baker2018-05-15
| | | | | | | | | | This might be a little sloppy, but there are legitimate cases where stdin is bytes, and cases where it is a string.
* | commands/thread use a BytesIO instead of StringIO objectDylan Baker2018-05-15
| | | | | | | | because the data is in bytes not strings.
* | alot/db/utils: improve unknown CTE messageDylan Baker2018-05-15
| |
* | Merge branch 'master' into py3kDylan Baker2018-05-15
|\ \
| * | better message on hook loading failureMatthieu Coudron2018-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The typical current message looks like: unable to load hooks file:/home/teto/.config/alot/hooks.py without telling why python couldn't load the hook. This commit prints the exception, thus helping users to solve the issue (in my case encoding + wrong imports).
* | | Add support for binary Content-Transfer-EncodingDylan Baker2018-05-07
| | |
* | | Fix some formatting requests for @luccDylan Baker2018-04-24
| | |
* | | This merges Pazz split of the extract_body functionDylan Baker2018-04-24
|\| | | | | | | | | | | | | | And attempts to fix handling of non text/plain parts by leaving them as bytes until they've been passed to the program that will render them.
| * | refactor db/utils.extract_bodyPatrick Totzke2018-04-24
| |/ | | | | | | | | | | | | This moves out the plaintext rendering of email parts (that are not multipart/* and not text/plain) into a separate utility function render_part. This function looks up and calls the apropriate mailcap handler.
* | db/utils: fix bad merge conflict resolutionDylan Baker2018-04-24
| | | | | | | | oops
* | Merge remote-tracking branch 'bignose/wip/issue/python3-codeclimate' into py3kDylan Baker2018-04-24
|\ \ | | | | | | | | | | | | One small conflict caused by "db/utils: correctly handle 8bit encoded mail"
| * | Extract a level of nested control flow.Ben Finney2018-04-23
| | |
| * | Wrap long statements on open-bracket syntax.Ben Finney2018-04-23
| | |
| * | Raise an exception with a meaningful message.Ben Finney2018-04-23
| | | | | | | | | | | | | | | | | | The `assert` statement is not always executed (it can be optimised away) so is not a suitable run-time check. Also, an exception allows for a better error message.
| * | Extract a level of nested conditionals for tag command.Ben Finney2018-04-23
| | |