summaryrefslogtreecommitdiff
path: root/alot/commands/globals.py
Commit message (Collapse)AuthorAge
...
* 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 global namedqueries commandPatrick Totzke2018-07-24
| | | | ... that opens a new namedqueries buffer
* Merge pull request #1252 from pazz/update-envelope-keysDylan Baker2018-07-24
|\ | | | | fix: automatically update envelope gpg keys only if requested. see #1228
| * rename function that updates gpg keys in envelopesPatrick Totzke2018-06-21
| |
* | 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>
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* Wrap long statements on open-bracket syntax.Ben Finney2018-04-23
|
* Use urwid.util.detected_encoding instead of try_decodeDylan Baker2018-03-06
| | | | | Commands running in a subprocess should return the terminal encoding so we don't need to guess their encoding.
* use helper.try_decode instead of guess_encodingDylan Baker2018-03-06
| | | | basically just remove hand rolling what try_decode does.
* globals: try to fix debian magic errorDylan Baker2018-03-01
| | | | I can't reproduce this with arch, but it does reproduce in CI.
* commands/globals: fix bindings help for py3kDylan Baker2018-03-01
|
* alot/command/globals: fix py3kDylan Baker2018-03-01
|
* repalces uses of dict.iter* with non-iter versionsDylan Baker2018-03-01
| | | | | | | in python3 dict.{keys,items,values} return views, which are similar to iterators without some of the caveats about modifying the underlying object. The iter* and view* methods have been removed, instead one warps dict.x in iter or list to get those types.
* py3k: remove basestring and unicode.Dylan Baker2018-03-01
| | | | This probably isn't completely right, but it's a start.
* Move screen stop/start logic into context manager.Thomas Nixon2018-02-19
| | | | | | | As well as reducing duplication and adding screen size detection to :pipeto and :pyshell, this ensures that the screen is always restarted, resulting in cleaner error handling if an error occurs while the screen is stopped.
* Fix #1191, lockup after running external command.Thomas Nixon2018-02-19
| | | | | | | | This is caused by urwid/urwid#285; stopping and starting the whole mainloop rather than just the screen works around this, but that's only available in newer urwid versions. This also affected the :pipeto and :pyshell commands.
* Merge pull request #1199 from three-comrades/fix_templatesDylan Baker2018-02-15
|\ | | | | Fix templates with non-ascii characters.
| * Fix non-ascii templates.Julian Mehne2018-02-15
| |
* | Add --tags argument to compose commandJohannes Löthberg2018-02-12
|/ | | | Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Move processing of setting to the right place.Julian Mehne2018-01-21
|
* Fix `:compose --template=foo` if default template_dir is used.Julian Mehne2018-01-21
| | | | | | | | | | | Fixes the following bug: To reproduce:: - Don't define `template_dir` in the user configuration file, such that the default value is used. - Run: :compose --template=foobar Problem: Displays error: `no template directory: $XDG_CONFIG_HOME/alot/templates`
* Report error if configuration file cannot be reloaded.Julian Mehne2018-01-07
|
* Inform user why :compose got cancelled.Julian Mehne2017-12-02
|
* pep8 fixesPatrick Totzke2017-09-01
| | | | | This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
* commands/globals: Only set stdin to a pipe if there is dataDylan Baker2017-08-23
| | | | | | | | | | Otherwise the editor will crash. I can't figure out for the life of me to test this. I thought that I would be able to do something like detect if stdin is a tty or something else, but that doesn't seem to work. Fixes #1137
* command/globals: Test for not None rather than callableDylan Baker2017-08-23
| | | | | | If someone passes us something other than None or a callable they're abusing the API. Instead, use is not None, and let the code except if something else is passed.
* commands/globals: Simplify ExternalCommand thread_CodeDylan Baker2017-08-23
| | | | | | This simplifies the code but not using an if/else, but to just use a ternary to set the input to Popen.communicate. This also pulls some code out of the try/except block that isn't being tried.
* commands/globals: spelling and grammar of a commentDylan Baker2017-08-22
| | | | It's just a little off
* Merge pull request #1126 from lucc/py3/py2-compatibleDylan Baker2017-08-22
|\ | | | | Some small changes that are py2 and py3 compatible
| * py3k: Use logging.warning instead of warnLucas Hoffmann2017-08-20
| | | | | | | | | | The short version is deprecated as of python3. Both are available in both python versions.
* | Use io.BytesIO and io.StringIODylan Baker2017-08-19
|/ | | | | | | | In python3 StringIO and cStringIO are gone. In their place are io.BytesIO and io.StringIO. They are somewhat different in that they are not separated on implementation, but on the type they emulated. BytesIO works like the bytes class (str in python 2), while StringIO works like the str class (unicode in python2).
* alot: replace email.Utils with email.utilsDylan Baker2017-08-16
| | | | | In python 3 email.Utils doesn't exist, in python 2.7 both do, but Utils is deprecated.
* commands: Don't try to sign_by_default without a gpg keyDylan Baker2017-08-11
| | | | | | Currently it's possible to set sign_by_default without setting a default key. This is obviously not a good plan for all sorts of reasons. This fixes the two failing tests from the last commit.
* docs: Update docstrings for move commandsLucas Hoffmann2017-08-05
|
* settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* Add a reload commandDylan Baker2017-07-10
| | | | | | | This command allows the configuration to be reloaded while alot is running. Fixes #1046
* Exclude search.exclude_tags from searchesJohannes Löthberg2017-06-08
| | | | | | Fixes #707 and #332. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* don't select "yes" on returnPatrick Totzke2017-06-05
|
* commands/globals: use __future__ divisionDylan Baker2017-01-27
| | | | | | This imports division from __future__, and changes the one use of division to integer division, since it's for calculating how many lines to move the cursor.
* Merge pull request #1000 from dcbaker/pr/argument-validatorLucas Hoffmann2017-01-27
|\ | | | | argparse validators
| * Move utils/booleanaction.py to utils/argparse.pyDylan Baker2017-01-25
| | | | | | | | | | This module is going to be enhanced with additional components in later patches in this series, so it needs a more generic name.
* | Use email.utils.formataddr when preparing headersLucas Hoffmann2017-01-25
|/
* Merge pull request #984 from lucc/future/absolute-importsLucas Hoffmann2017-01-21
|\ | | | | Use absolute_imports from __future__
| * Use absolute_imports from __future__Lucas Hoffmann2017-01-18
| |
* | commands/global: Don't double prompt to close last bufferDylan Baker2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Print error when trying to close last buffer without enabling settingDylan Baker2017-01-17
|/ | | | | | | | | | | | | | | | 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
* Merge pull request #963 from dcbaker/pr/fix-typoPatrick Totzke2017-01-12
|\ | | | | alot/commands/globals: fix typo
| * alot/commands/globals: fix typoDylan Baker2017-01-12
| | | | | | | | | | This is a bug, though apparently no one has run into it yet. Found through inspection.
* | Merge pull request #878 from meskio/encrypt_ccDylan Baker2017-01-12
|\ \ | |/ |/| Encrypt for the CC addresses too
| * Encrypt for the CC addresses tooRuben Pollan2017-01-01
| |