summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/command.py7
-rw-r--r--alot/settings.py3
-rw-r--r--data/example.rc6
3 files changed, 14 insertions, 2 deletions
diff --git a/alot/command.py b/alot/command.py
index 7102d89b..c51fe8be 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -313,6 +313,13 @@ class ComposeCommand(Command):
os.unlink(tf.name)
ui.apply_command(OpenEnvelopeCommand(email=self.email))
+ if config.getboolean('general', 'ask_from'):
+ header['From'] = ui.prompt(prefix='From>', text=header['From'])
+ if config.getboolean('general', 'ask_to'):
+ header['To'] = ui.prompt(prefix='To>', text=header['To'])
+ if config.getboolean('general', 'ask_subject'):
+ header['Subject'] = ui.prompt(prefix='Subject>',
+ text=header['Subject'])
tf = tempfile.NamedTemporaryFile(delete=False)
for i in header.items():
tf.write('%s: %s\n' % i)
diff --git a/alot/settings.py b/alot/settings.py
index c4bc4708..a28cf7ba 100644
--- a/alot/settings.py
+++ b/alot/settings.py
@@ -34,6 +34,9 @@ DEFAULTS = {
'spawn_editor': 'False',
'displayed_headers': 'From,To,Cc,Bcc,Subject',
'authors_maxlength': '30',
+ 'ask_from': 'False',
+ 'ask_to': 'False',
+ 'ask_subject': 'True',
},
'normal-theme': {
'bufferlist_focus_bg': 'dark gray',
diff --git a/data/example.rc b/data/example.rc
index 41b2e4a2..afd1b0f3 100644
--- a/data/example.rc
+++ b/data/example.rc
@@ -5,10 +5,12 @@ hooks = hooks.py
editor_cmd = /usr/bin/vim -f -c 'set filetype=mail'
pager_cmd = /usr/bin/view -f -c 'set filetype=mail'
terminal_cmd = /usr/bin/urxvt -T notmuch -e
-spawn_editor = True
-spawn_pager = True
+spawn_editor = False
authors_maxlength = 30
displayed_headers = From,To,Cc,Bcc,Subject
+ask_from = False
+ask_to = False
+ask_subject = True
[normal-theme]
bufferlist_focus_bg = dark gray