From: Karel Zak Date: Wed, 14 Dec 2011 12:40:26 +0000 (+0100) Subject: add notmuch::// uri X-Git-Tag: neomutt-20160317~5^2~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ef1dc44e3581fccf5f4b35ec26ee25e72ac51be;p=neomutt add notmuch::// uri Signed-off-by: Karel Zak --- diff --git a/README.notmuch b/README.notmuch index 1a5f3b759..03905c0f9 100644 --- a/README.notmuch +++ b/README.notmuch @@ -14,6 +14,33 @@ notmuch support for mutt $ ./configure --enable-notmuch $ make + * folders URI + + notmuch:///[?=[& ...]] + + The is absolute path to the the directory where is notmuch database + as returned by 'notmuch config get database.path' command. Note that the + should NOT include .notmuch directory name. + + Items: + + query= + + See SEARCH SYNTAX in notmuch man page. Don't forget to use "and" and + "or" operators in your queries. + + Note that proper URI should not contain blank space and all "bad" chars + should be encoded, for example + + "tag:AAA and tag:BBB" --encoding-> tag:AAA%20and%20tag:BBB + + but mutt config file parser is smart enough to accept space in quoted + strings. It means that you can use + + "notmuch:///foo?query=tag:AAA and tag:BBB" + + in your config files to keep things readable. + * virtual mailboxes diff --git a/url.c b/url.c index 988cf59ee..dbde272b6 100644 --- a/url.c +++ b/url.c @@ -40,12 +40,15 @@ static const struct mapping_t UrlMap[] = { "pop", U_POP }, { "pops", U_POPS }, { "mailto", U_MAILTO }, +#ifdef USE_NOTMUCH + { "notmuch", U_NOTMUCH }, +#endif { "smtp", U_SMTP }, { "smtps", U_SMTPS }, { NULL, U_UNKNOWN } }; -static int url_pct_decode (char *s) +int url_pct_decode (char *s) { char *d; diff --git a/url.h b/url.h index 926416e74..bb54c657d 100644 --- a/url.h +++ b/url.h @@ -11,6 +11,9 @@ typedef enum url_scheme U_SMTP, U_SMTPS, U_MAILTO, +#ifdef USE_NOTMUCH + U_NOTMUCH, +#endif U_UNKNOWN } url_scheme_t; @@ -34,5 +37,6 @@ int url_parse_file (char *d, const char *src, size_t dl); int url_parse_ciss (ciss_url_t *ciss, char *src); int url_ciss_tostring (ciss_url_t* ciss, char* dest, size_t len, int flags); int url_parse_mailto (ENVELOPE *e, char **body, const char *src); +int url_pct_decode (char *s); #endif