mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
lib: add config key INDEX_AS_TEXT
Higher level processing as a list of regular expressions and documentation will follow.
This commit is contained in:
parent
44924a6a09
commit
c6733a45c8
5 changed files with 11 additions and 0 deletions
|
@ -599,6 +599,8 @@ _notmuch_config_key_to_string (notmuch_config_key_t key)
|
||||||
return "database.autocommit";
|
return "database.autocommit";
|
||||||
case NOTMUCH_CONFIG_EXTRA_HEADERS:
|
case NOTMUCH_CONFIG_EXTRA_HEADERS:
|
||||||
return "show.extra_headers";
|
return "show.extra_headers";
|
||||||
|
case NOTMUCH_CONFIG_INDEX_AS_TEXT:
|
||||||
|
return "index.as_text";
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -642,6 +644,7 @@ _notmuch_config_default (notmuch_database_t *notmuch, notmuch_config_key_t key)
|
||||||
else
|
else
|
||||||
email = _get_email_from_passwd_file (notmuch);
|
email = _get_email_from_passwd_file (notmuch);
|
||||||
return email;
|
return email;
|
||||||
|
case NOTMUCH_CONFIG_INDEX_AS_TEXT:
|
||||||
case NOTMUCH_CONFIG_NEW_IGNORE:
|
case NOTMUCH_CONFIG_NEW_IGNORE:
|
||||||
return "";
|
return "";
|
||||||
case NOTMUCH_CONFIG_AUTOCOMMIT:
|
case NOTMUCH_CONFIG_AUTOCOMMIT:
|
||||||
|
|
|
@ -2563,6 +2563,7 @@ typedef enum {
|
||||||
NOTMUCH_CONFIG_USER_NAME,
|
NOTMUCH_CONFIG_USER_NAME,
|
||||||
NOTMUCH_CONFIG_AUTOCOMMIT,
|
NOTMUCH_CONFIG_AUTOCOMMIT,
|
||||||
NOTMUCH_CONFIG_EXTRA_HEADERS,
|
NOTMUCH_CONFIG_EXTRA_HEADERS,
|
||||||
|
NOTMUCH_CONFIG_INDEX_AS_TEXT,
|
||||||
NOTMUCH_CONFIG_LAST
|
NOTMUCH_CONFIG_LAST
|
||||||
} notmuch_config_key_t;
|
} notmuch_config_key_t;
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ database.mail_root=MAIL_DIR
|
||||||
database.path=MAIL_DIR
|
database.path=MAIL_DIR
|
||||||
foo.list=this;is another;list value;
|
foo.list=this;is another;list value;
|
||||||
foo.string=this is another string value
|
foo.string=this is another string value
|
||||||
|
index.as_text=
|
||||||
maildir.synchronize_flags=true
|
maildir.synchronize_flags=true
|
||||||
new.ignore=
|
new.ignore=
|
||||||
new.tags=unread;inbox
|
new.tags=unread;inbox
|
||||||
|
|
|
@ -299,6 +299,7 @@ database.backup_dir
|
||||||
database.hook_dir
|
database.hook_dir
|
||||||
database.mail_root=MAIL_DIR
|
database.mail_root=MAIL_DIR
|
||||||
database.path
|
database.path
|
||||||
|
index.as_text=
|
||||||
maildir.synchronize_flags=true
|
maildir.synchronize_flags=true
|
||||||
new.ignore=
|
new.ignore=
|
||||||
new.tags=unread;inbox
|
new.tags=unread;inbox
|
||||||
|
|
|
@ -440,6 +440,7 @@ cat <<'EOF' >EXPECTED
|
||||||
10: 'USER_FULL_NAME'
|
10: 'USER_FULL_NAME'
|
||||||
11: '8000'
|
11: '8000'
|
||||||
12: 'NULL'
|
12: 'NULL'
|
||||||
|
13: ''
|
||||||
== stderr ==
|
== stderr ==
|
||||||
EOF
|
EOF
|
||||||
unset MAILDIR
|
unset MAILDIR
|
||||||
|
@ -725,6 +726,7 @@ test_expect_equal_file EXPECTED OUTPUT
|
||||||
test_begin_subtest "list by keys (ndlc)"
|
test_begin_subtest "list by keys (ndlc)"
|
||||||
notmuch config set search.exclude_tags "foo;bar;fub"
|
notmuch config set search.exclude_tags "foo;bar;fub"
|
||||||
notmuch config set new.ignore "sekrit_junk"
|
notmuch config set new.ignore "sekrit_junk"
|
||||||
|
notmuch config set index.as_text "text/"
|
||||||
cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
|
cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
|
||||||
{
|
{
|
||||||
notmuch_config_key_t key;
|
notmuch_config_key_t key;
|
||||||
|
@ -751,6 +753,7 @@ cat <<'EOF' >EXPECTED
|
||||||
10: 'Notmuch Test Suite'
|
10: 'Notmuch Test Suite'
|
||||||
11: '8000'
|
11: '8000'
|
||||||
12: 'NULL'
|
12: 'NULL'
|
||||||
|
13: 'text/'
|
||||||
== stderr ==
|
== stderr ==
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
@ -785,6 +788,7 @@ cat <<'EOF' >EXPECTED
|
||||||
10: 'USER_FULL_NAME'
|
10: 'USER_FULL_NAME'
|
||||||
11: '8000'
|
11: '8000'
|
||||||
12: 'NULL'
|
12: 'NULL'
|
||||||
|
13: ''
|
||||||
== stderr ==
|
== stderr ==
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT.clean
|
test_expect_equal_file EXPECTED OUTPUT.clean
|
||||||
|
@ -856,6 +860,7 @@ database.backup_dir MAIL_DIR/.notmuch/backups
|
||||||
database.hook_dir MAIL_DIR/.notmuch/hooks
|
database.hook_dir MAIL_DIR/.notmuch/hooks
|
||||||
database.mail_root MAIL_DIR
|
database.mail_root MAIL_DIR
|
||||||
database.path MAIL_DIR
|
database.path MAIL_DIR
|
||||||
|
index.as_text text/
|
||||||
key with spaces value, with, spaces!
|
key with spaces value, with, spaces!
|
||||||
maildir.synchronize_flags true
|
maildir.synchronize_flags true
|
||||||
new.ignore sekrit_junk
|
new.ignore sekrit_junk
|
||||||
|
|
Loading…
Reference in a new issue