From c84a277061c8af1b0115017e2ec417be4b161861 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 12 May 2013 19:54:58 +0100 Subject: fix typo --- alot/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alot/helper.py b/alot/helper.py index e1fbdabe..1dd6968a 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -287,7 +287,7 @@ def call_cmd(cmdlist, stdin=None): .. warning:: - This returns with the first screen content for interctive commands. + This returns with the first screen content for interactive commands. :param cmdlist: shellcommand to call, already splitted into a list accepted by :meth:`subprocess.Popen` -- cgit v1.2.3 From a1420aa8635b9b062ba5d1dd6f42772181fc92b1 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 12 May 2013 19:57:32 +0100 Subject: doc: clean up docstring for SettingsManager --- alot/settings/manager.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/alot/settings/manager.py b/alot/settings/manager.py index 67dd553c..70389413 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -34,8 +34,6 @@ class SettingsManager(object): :type alot_rc: str :param notmuch_rc: path to notmuch's config file :type notmuch_rc: str - :theme: path to initially used theme file - :type theme: str """ self.hooks = None self._mailcaps = mailcap.getcaps() -- cgit v1.2.3 From 7b7e456fd8a59ac7c545b868bd86e5ed27eeaaf5 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sat, 25 May 2013 23:52:33 +0100 Subject: doc: minor tweak of interface doc --- docs/source/api/interface.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/api/interface.rst b/docs/source/api/interface.rst index 7d66cf1f..0ee0cb29 100644 --- a/docs/source/api/interface.rst +++ b/docs/source/api/interface.rst @@ -1,7 +1,7 @@ User Interface ================== -Alot sets up a widget tree and an :class:`mainloop ` +Alot sets up a widget tree and a :class:`mainloop ` in the constructor of :class:`alot.ui.UI`. The visible area is a :class:`urwid.Frame`, where the footer is used as a status line and the body part displays the currently active :class:`alot.buffers.Buffer`. @@ -14,7 +14,8 @@ customary in urwid. Instead, the root widget given to urwids mainloop is a custo key presses to the wrapped root widget and thereby accessing standard urwid behaviour. -In order to keep the interface non-blocking, alot makes use of twisted's deferred_ - a +In order to keep the interface non-blocking and react to events like +terminal size changes, alot makes use of twisted's deferred_ - a framework that makes it easy to deal with callbacks. Many commands in alot make use of `inline callbacks`_, which allow you to treat deferred-returning functions almost like syncronous functions. Consider the following example of a function that prompts for some -- cgit v1.2.3 From 6649f8a5bf98a272b821c73813086f26d06ea7a3 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 2 Jun 2013 19:30:39 +0100 Subject: doc: fix Envelope.attachments docstring --- alot/db/envelope.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alot/db/envelope.py b/alot/db/envelope.py index 0f8c195c..f6787705 100644 --- a/alot/db/envelope.py +++ b/alot/db/envelope.py @@ -41,9 +41,9 @@ class Envelope(object): tmpfile = None """template text for initial content""" attachments = None - """list of :class:`~alot.db.attachment.Attachment`s""" + """list of :class:`Attachments `""" tags = [] - """tags # tags to add after successful sendout""" + """tags to add after successful sendout""" def __init__( self, template=None, bodytext=u'', headers=None, attachments=[], -- cgit v1.2.3 From f84e34f5989313a715256327aa048f025b6a42be Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 2 Jun 2013 20:27:24 +0100 Subject: doc: clean up crypto docs --- docs/source/crypto/index.rst | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/docs/source/crypto/index.rst b/docs/source/crypto/index.rst index 52fb356a..7553f668 100644 --- a/docs/source/crypto/index.rst +++ b/docs/source/crypto/index.rst @@ -2,20 +2,23 @@ Cryptography ************ -At the moment alot only supports signing of outgoing mails via PGP/MIME (:rfc:`3156`). -Encryption via PGP/MIME (:rfc:`3156`) is in an experimental stadium. +Alot has built in support for constructing signed and/or encrypted mails +according to PGP/MIME (:rfc:`3156`, :rfc:`3156`) via gnupg. +It does however rely on a running `gpg-agent` to handle password entries. -.. note:: To use GPG with alot, you need to have `gpg-agent` running. +.. note:: You need to have `gpg-agent` running to use GPG with alot! - `gpg-agent` will handle passphrase entry in a secure and configurable way, and it will cache your passphrase for some - amount of time so you don’t have to enter it over and over again. For details on how to set this up we refer to - `gnupg's manual `_. + `gpg-agent` will handle passphrase entry in a secure and configurable way, and it will cache your + passphrase for some time so you don’t have to enter it over and over again. For details on how to + set this up we refer to `gnupg's manual `_. .. rubric:: Signing outgoing emails -You can use the commands `sign`, `unsign` and `togglesign` in envelope mode +You can use the commands :ref:`sign `, +:ref:`unsign ` and +:ref:`togglesign ` in envelope mode to determine if you want this mail signed and if so, which key to use. -To specify the key to use you can pass a hint string as argument to +To specify the key to use you may pass a hint string as argument to the `sign` or `togglesign` command. This hint would typically be a fingerprint or an email address associated (by gnupg) with a key. @@ -29,19 +32,11 @@ accordingly. You can set the default to-sign bit and the key to use for each :ref:`account ` individually using the options :ref:`sign_by_default ` and :ref:`gpg_key `. - -.. rubric:: Tips - -In case you are using alot via SSH, we recommend to use `pinentry-curses` -instead of the default graphical pinentry. You can do that by setting up your -:file:`~/.gnupg/gpg-agent.conf` like this:: - - pinentry-program /usr/bin/pinentry-curses - .. rubric:: Encrypt outgoing emails -You can use the commands `encrypt` and `unencrypt` in envelope mode to -encrypt the mail. You have to give a hint string as argument to the `encrypt` -command. This hint would normally be a fingerprint of the key. - -Encryption is done after signing (if signing is enabled) the email. +You can use the commands :ref:`encrypt `, +:ref:`unencrypt ` and +and :ref:`toggleencrypt ` and +in envelope mode to ask alot to encrypt the mail before sending. +The :ref:`encrypt ` command accepts an optional +hint string as argument to determine the key of the recipient. -- cgit v1.2.3 From d7d481aaab924db20112cd58f984bba6cd13298a Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 2 Jun 2013 20:48:40 +0100 Subject: doc: move crypto docs to usage section --- docs/source/crypto/index.rst | 42 ------------------------------------------ docs/source/index.rst | 1 - docs/source/usage/commands.rst | 3 --- docs/source/usage/crypto.rst | 38 ++++++++++++++++++++++++++++++++++++++ docs/source/usage/index.rst | 12 ++++++++++++ 5 files changed, 50 insertions(+), 46 deletions(-) delete mode 100644 docs/source/crypto/index.rst create mode 100644 docs/source/usage/crypto.rst diff --git a/docs/source/crypto/index.rst b/docs/source/crypto/index.rst deleted file mode 100644 index 7553f668..00000000 --- a/docs/source/crypto/index.rst +++ /dev/null @@ -1,42 +0,0 @@ -************ -Cryptography -************ - -Alot has built in support for constructing signed and/or encrypted mails -according to PGP/MIME (:rfc:`3156`, :rfc:`3156`) via gnupg. -It does however rely on a running `gpg-agent` to handle password entries. - -.. note:: You need to have `gpg-agent` running to use GPG with alot! - - `gpg-agent` will handle passphrase entry in a secure and configurable way, and it will cache your - passphrase for some time so you don’t have to enter it over and over again. For details on how to - set this up we refer to `gnupg's manual `_. - -.. rubric:: Signing outgoing emails - -You can use the commands :ref:`sign `, -:ref:`unsign ` and -:ref:`togglesign ` in envelope mode -to determine if you want this mail signed and if so, which key to use. -To specify the key to use you may pass a hint string as argument to -the `sign` or `togglesign` command. This hint would typically -be a fingerprint or an email address associated (by gnupg) with a key. - -Signing (and hence passwd entry) will be done at most once shortly before -a mail is sent. - -In case no key is specified, alot will leave the selection of a suitable key to gnupg -so you can influence that by setting the `default-key` option in :file:`~/.gnupg/gpg.conf` -accordingly. - -You can set the default to-sign bit and the key to use for each :ref:`account ` -individually using the options :ref:`sign_by_default ` and :ref:`gpg_key `. - -.. rubric:: Encrypt outgoing emails - -You can use the commands :ref:`encrypt `, -:ref:`unencrypt ` and -and :ref:`toggleencrypt ` and -in envelope mode to ask alot to encrypt the mail before sending. -The :ref:`encrypt ` command accepts an optional -hint string as argument to determine the key of the recipient. diff --git a/docs/source/index.rst b/docs/source/index.rst index 323bec4c..d383dad5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -14,7 +14,6 @@ User Manual installation usage/index configuration/index - crypto/index api/index faq diff --git a/docs/source/usage/commands.rst b/docs/source/usage/commands.rst index 6fa99b58..a3855b21 100644 --- a/docs/source/usage/commands.rst +++ b/docs/source/usage/commands.rst @@ -1,6 +1,3 @@ -Commands -======== - Alot interprets user input as command line strings given via its prompt or :ref:`bound to keys ` in the config. Command lines are semi-colon separated command strings, each of which diff --git a/docs/source/usage/crypto.rst b/docs/source/usage/crypto.rst new file mode 100644 index 00000000..b656078d --- /dev/null +++ b/docs/source/usage/crypto.rst @@ -0,0 +1,38 @@ +Alot has built in support for constructing signed and/or encrypted mails +according to PGP/MIME (:rfc:`3156`, :rfc:`3156`) via gnupg. +It does however rely on a running `gpg-agent` to handle password entries. + +.. note:: You need to have `gpg-agent` running to use GPG with alot! + + `gpg-agent` will handle passphrase entry in a secure and configurable way, and it will cache your + passphrase for some time so you don’t have to enter it over and over again. For details on how to + set this up we refer to `gnupg's manual `_. + +.. rubric:: Signing outgoing emails + +You can use the commands :ref:`sign `, +:ref:`unsign ` and +:ref:`togglesign ` in envelope mode +to determine if you want this mail signed and if so, which key to use. +To specify the key to use you may pass a hint string as argument to +the `sign` or `togglesign` command. This hint would typically +be a fingerprint or an email address associated (by gnupg) with a key. + +Signing (and hence passwd entry) will be done at most once shortly before +a mail is sent. + +In case no key is specified, alot will leave the selection of a suitable key to gnupg +so you can influence that by setting the `default-key` option in :file:`~/.gnupg/gpg.conf` +accordingly. + +You can set the default to-sign bit and the key to use for each :ref:`account ` +individually using the options :ref:`sign_by_default ` and :ref:`gpg_key `. + +.. rubric:: Encrypt outgoing emails + +You can use the commands :ref:`encrypt `, +:ref:`unencrypt ` and +and :ref:`toggleencrypt ` and +in envelope mode to ask alot to encrypt the mail before sending. +The :ref:`encrypt ` command accepts an optional +hint string as argument to determine the key of the recipient. diff --git a/docs/source/usage/index.rst b/docs/source/usage/index.rst index 224f831a..6520fb05 100644 --- a/docs/source/usage/index.rst +++ b/docs/source/usage/index.rst @@ -12,13 +12,25 @@ First Steps .. _usage.first_steps: .. include:: first_steps.rst + +Commands +======== + .. _usage.commands: .. include:: commands.rst + +Cryptography +============ + +.. _usage.crypto: +.. include:: crypto.rst + .. toctree:: :hidden: commands first_steps synopsis + crypto -- cgit v1.2.3 From f2b459bc43d055f4f0be5a85c97b8d74f92ad85a Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 2 Jun 2013 20:58:34 +0100 Subject: doc: update faq --- docs/source/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 84d9620d..212603e6 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -17,7 +17,7 @@ FAQ 2. What's with the snotty name? It's not meant to be presumptuous. I like the dichotomy; I like to picture the look on - someone's face who reads the :mailheader:`X-MAILER` flag "notmuch/alot"; I like cookies; I like + someone's face who reads the :mailheader:`User-Agent` header "notmuch/alot"; I like cookies; I like `this comic strip `_. 3. I want feature X! -- cgit v1.2.3 From a7b3493a5603384b875bb4df37f3d9c1bae4d8bf Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 2 Jun 2013 21:06:17 +0100 Subject: doc: fix missing section names in usage/commands/* --- docs/source/usage/commands.rst | 3 +++ docs/source/usage/crypto.rst | 3 +++ docs/source/usage/index.rst | 6 ------ docs/source/usage/modes/global.rst | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/source/usage/commands.rst b/docs/source/usage/commands.rst index a3855b21..6fa99b58 100644 --- a/docs/source/usage/commands.rst +++ b/docs/source/usage/commands.rst @@ -1,3 +1,6 @@ +Commands +======== + Alot interprets user input as command line strings given via its prompt or :ref:`bound to keys ` in the config. Command lines are semi-colon separated command strings, each of which diff --git a/docs/source/usage/crypto.rst b/docs/source/usage/crypto.rst index b656078d..6cee7753 100644 --- a/docs/source/usage/crypto.rst +++ b/docs/source/usage/crypto.rst @@ -1,3 +1,6 @@ +Cryptography +============ + Alot has built in support for constructing signed and/or encrypted mails according to PGP/MIME (:rfc:`3156`, :rfc:`3156`) via gnupg. It does however rely on a running `gpg-agent` to handle password entries. diff --git a/docs/source/usage/index.rst b/docs/source/usage/index.rst index 6520fb05..9d469597 100644 --- a/docs/source/usage/index.rst +++ b/docs/source/usage/index.rst @@ -13,16 +13,10 @@ First Steps .. include:: first_steps.rst -Commands -======== - .. _usage.commands: .. include:: commands.rst -Cryptography -============ - .. _usage.crypto: .. include:: crypto.rst diff --git a/docs/source/usage/modes/global.rst b/docs/source/usage/modes/global.rst index f5c616d9..56e24e54 100644 --- a/docs/source/usage/modes/global.rst +++ b/docs/source/usage/modes/global.rst @@ -3,6 +3,7 @@ Global Commands --------------- + The following commands are available globally .. _cmd.global.bclose: -- cgit v1.2.3 From 05a09c8ec9ff5b40ad395ac69a95abbc572401cd Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 2 Jun 2013 21:16:38 +0100 Subject: doc: clean up error message for invalid subcommands --- alot/init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alot/init.py b/alot/init.py index 0e857eaa..af6cf1b1 100755 --- a/alot/init.py +++ b/alot/init.py @@ -111,8 +111,8 @@ def main(): try: args.parseOptions() # When given no argument, parses sys.argv[1:] except usage.UsageError, errortext: - print '%s: %s' % (sys.argv[0], errortext) - print '%s: Try --help for usage details.' % (sys.argv[0]) + print '%s' % errortext + print 'Try --help for usage details.' sys.exit(1) # logging -- cgit v1.2.3