| Commit message (Collapse) | Author | Age |
... | |
|\
| |
| | |
commands/envelope: Fall back to account for signing key
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
This adds additional system locations to search for theme files, which
are either defined as the environment variable XDG_DATA_DIRS, or the
generic fallback (per the xdg base directories spec) as
/usr/local/share and /usr/share. We then add alot/themees to those paths
to search for themes in. This allows a package manager to install the
theme files system wide along with alot, and for alot to load them from
the system wide directories.
The Archlinux alot-git package is already installing the packages like
this.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a bit of refactoring to the Settings class for it's
setup, and adds a reload method. The refactoring encapsulates the
handling of NoneType for the read_*config methods, and reworks the
constructor just a bit so that it doesn't rely on calling methods to
create instance variables.
The end result is slightly cleaner, and will be useful for adding a
reload command to alot itself.
|
|
|
|
|
| |
The argument is handed to ConfigObj directly and allowing lines of text
to be passed here makes future tests much easier.
|
|\
| |
| | |
argparse validators
|
| |
| |
| |
| | |
This is just more reorganization.
|
|/ |
|
| |
|
|\
| |
| | |
Porting old doctests to unittest
|
| | |
|
|/ |
|
|
|
|
| |
This is just whitespace changes.
|
|
|
|
|
|
|
| |
The use of a list comprehension here saves one line of code, but doesn't
make the code clearer, a simple loop is more obvious. This also replaces
``if not v or v == ''`` with simply ``if not v``, since they're
equivalent.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This just adds the `r` prefix to a few strings.
|
| |
|
|
|
|
|
|
|
|
|
| |
Configobj's string interpolation feature does not work as expected in
account sections of alot configuration files.
The reason is that interpolation is done in ConfigObj.__getitem__
which alot does not use directly for account sections.
This patch causes all values to be read via ConfigObj.__getitem__
explicitly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|