| Commit message (Collapse) | Author | Age |
|\
| |
| | |
Use absolute_imports from __future__
|
| | |
|
|\ \
| | |
| | | |
widgets/globals: Fix typo which would lead to AttributeError
|
| | | |
|
|\ \ \
| | | |
| | | | |
alot/ui: Handle Exceptions in UI.apply_command callbacks
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This ports the same handling used in UI.apply_commandline to
UI.apply_command. This is necessary since though the first implies the
other, they are actually separate Deferred instances, and don't share a
callback/errback chain; but they can both receive a CommandCanceled
exception.
Fixes #965
|
| |/ /
|/| | |
|
|\ \ \
| | | |
| | | | |
Some random cleanup
|
| | | |
| | | |
| | | |
| | | | |
The method is only used once in a for loop.
|
| | |/
| |/| |
|
|\ \ \
| |/ /
|/| | |
Pr/fix 968 and 979
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently if global.quit_on_last_bclose is set to True (not the default),
and the last buffer is an envelope, then when 'd' or ':bclose' is
called, the user will be prompted twice to 'close without sending?'.
This patch fixes that by skipping the prompt in BufferCloseCommand, if
there is 1 buffer, and global.quit_on_last_bclose is True. It does this
by adding a private keyword to the ExitCommand() constructor, telling
that classes apply method to not prompt.
Fixes #979
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the last buffer if closed (using 'd' or ':bclose'), by default either
nothing will happen, or the user will be prompted whether he/she wants
to close without saving, and then nothing happens. This can be changed
by setting global.quit_on_last_bclose to True (it defaults to False).
This patch changes that behavior to preempt the prompt and adds a UI
notification that the relevant option is unset, and returns. It will
check the same conditions again after the yield statement since the
number of buffers or the options might have changed (it seems rather
unlikely that the options will change, but it's a tiny amount of code
with minimal performance impact and it's better to be safe).
Fixes #968
|
|\ \ \
| | | |
| | | | |
Porting old doctests to unittest
|
| | | | |
|
| | | | |
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
helper: Don't rely on GNU extensions for strftime
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While the reality is that most alot users probably have glibc as their C
library and can therefore rely on %P, it is possible that there are
users or potential users who run a *BSD or other unix-like OS. This
leaves only non-GNU extensions, though some of the extensions are
specified in later POSIX, unix or C specifications.
|
| | | |
|
|/ / |
|
|\ \
| |/
|/| |
Settings for enabling mouse
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Mouse support is enabled by default. To disable mouse support, set
```
handle_mouse = False
```
in your config file.
|
|\ \
| | |
| | | |
alot/completion: revert premature optimization
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The change this is partially reverting removed a variable assignment
that was actually needed.
Fixes #962
|
|\ \ \
| | | |
| | | | |
alot/commands/globals: fix typo
|
| |/ /
| | |
| | |
| | |
| | | |
This is a bug, though apparently no one has run into it yet. Found
through inspection.
|
|\ \ \
| |/ /
|/| | |
Encrypt for the CC addresses too
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One of the differences between map/filter and a comprehension is what
happens with None. For map and filter passing None as the function will
be treated as an identity function (equivalent to lambda x: x), for
comprehensions however, this will raise an exception (calling NoneType).
The fix is rather simple, instead of making the default of filtfun None,
make it an identity function. I've used lambda x: x since it's easy,
although defining an identity function in a utility library might be
preferable since lambdas are slower than normal functions.
Fixes #946
|
|\ \
| | |
| | | |
Replace twisted command line parsing with argparse
|
| | |
| | |
| | |
| | |
| | | |
This was tested with lsof(8) and the files are not open when alot is up and
running.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is only possible for the notmuch config file and not for the alot config
file as the former is strictly required but the latter is not. If the latter
does not exist it will be detected by the argument parser. If the former is
not given on the command line the parser will return `None` and we can
manually check if the default config file exists and else just skip the alot
config file.
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixes the -n option.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This again sightly changes the help output and also the possible options for
the compose subcommand.
|
| | |
| | |
| | |
| | |
| | | |
Especially let the command line parser check if a file given on the command
line exists.
|
| | |
| | |
| | |
| | |
| | | |
The command line interface is copied as directly as possible. But at least
the help output is formatted differently.
|
|/ /
| |
| |
| | |
Fixes pazz/alot#955
|
|\ \
| | |
| | | |
adding support for mouse scrolling
|
| |/ |
|
|/ |
|
|
|
|
|
|
| |
This reverts commit 581ed2987bd456d2894637a30bb5a14a4caa5f9b.
Fixes #942
|
| |
|
|
|
|
| |
This is just whitespace changes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the deprecated __cmp__ function with the more modern
__lt__, __eq__, and __ne__, and then uses functools.total_ordering to
implemented the remaining pieces of the rich comparison protocol
automatically. It also make use of the NotImplemented singleton, which
python uses to signal to rich comparators that this class doesn't no how
to compare to the other class, which results in the complementary method
from the other class being used, and if both return NotImplemented than
a TypeError is generated.
There are two reasons to make this change. First, python 3 only supports
rich comparisons, and second rich comparisons are much faster than using
cmp (and the __cmp__ protocol) because cmp is called at least 3 times
per element, while a rich comparitor is called one per element.
functools.total_ordering is in the standard library from 2.7 and 3.3,
and will implement the rich comparison protocol provided that __eq__ and
at least one of __lt__, __le__, __ge__, or __gt__ are implemented. It
does not (oddly enough) implement __ne__, so I've implemented that
manually.
|
| |
|