| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of cases of mutable keyword arguments (list and dict
in this case). Mutable keyword arguments are rather dangerous, since any
mutation of the default value is persistent, which will inevitably lead
to bugs.
For example, imagine this code:
def func(def=[]):
def.append('foo')
return def
>>> func()
['foo']
>>> func()
['foo', 'foo']
This is almost certainly not what was intended. This code generally uses
the idiom of setting the default value to None, and then assigning with
or `value = value or []` which will replace value with the empty list
(or dict) when value is falsey, like None or another empty list.
|
|
|
|
|
|
|
| |
I don't think this was correct from the start, since "foo@bar.com" would
match "bfoo@bar.com", even if there was a "bfoo@bar.com" in the
accountmap, depending on the order that they happened to be sorted in
accountmap.
|
| |
|
| |
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
| |
|
|
|
|
|
| |
`del` and `return` are keywords and not functions so the braces are not
needed.
|
| |
|
|
|
|
| |
that exposes ExternalAddressbook's new functionality
|
|
|
|
|
|
| |
The class is now called ExternalAddressbook
and makes it optional to call the external command with
the given search string as parameter when looking up addresses
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
regarding utf8 chars in the config being read as str, not unicode
in python v2.7. This pathc introduces an additional
`alot.helper.string_decode` around the translated tagname read from the
config, and fixes issue #693. In the long run, we expect configobj
to be fully backweards compatible.
|
|
|
|
| |
mostly automatically fixed
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This ensures that commandlines that are bound to a key
are not fired right away but wait a little (config option 'input_timeout')
in case there are other bindings with this key as prefix.
This allows to bind for instance 'g g' to move up while at the same time
one can bind 'g' to global replies. Without this change, the 'g' binding
would be fired right away.
|
|
|
|
|
|
|
| |
When there was a theme parse error, alot was producing incorrect exception:
in read_config raise ConfigError((err_msg % str(themestring)) + e.message)
TypeError: cannot concatenate 'str' and 'ParseError' objects
|
| |
|
|
|
|
|
| |
.. the current value cannot be prefix of any bound
keysequence. fixes #547
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This causes SettingsManager not to read the default configs upon init
when no config paths are passed on.
It is safe because alot.init.main
triggers reading the config files anyway.
This fixes a problem with building the docs on rfd.org due to them not havin configobj available at
build time.
|
| |
|
| |
|
|
|
|
| |
cf issue #500
|
|
|
|
| |
..in theme files
|
| |
|
| |
|
|
|
|
|
|
| |
This has been done before to provide the default bindings,
which are now read directly from defautls/default.bindings
during startup.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This re-introduces a separate file containing the default keybindings
for alot. The values from this file are *always* used as fallbacks
and can be overwritten by bindings from the users config.
To be able to unbind a default binding just bind it to an empty string.
The same will allow buffer-local bindings to be overwritten by global
bindings as described in https://github.com/pazz/alot/issues/403#issuecomment-4434948.
cf issue #487
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
this makes hiding tags possible simply by making their
'translated' value the empty string.
Note that this still sets the TagWidget.hidden property
because those may not be displayed with width 0 (as any other widget)
because it'd break urwid.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
this makes sure that undefined values in highlight 'threadline-foo' sections
default to their corresponding parts in the 'threadlin' (default) section
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
according to the given attribudes read in the new format
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the user to specify alternate 'threadline.*'
sections for searchmode: They specify the difference to the default
threadline theming.
Each of those can contain fields 'query' and 'tagged_with' to determine
if they apply: We go through all those threadline sections top down,
for each of them check if the conditions query (thread matches querystring)
and 'tagged_with' (culmulative tags of messages in thread contain those listed).
The first section that matches wins, default is to section 'threadline'.
|
| |
|
|
|
|
| |
make sure it always returns a tuple
|