[PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread Jani Nikula
h, message, path); > + } > if (state->synchronize_flags == TRUE) > notmuch_message_maildir_flags_to_tags (message); > notmuch_message_thaw (message); > @@ -878,6 +909,7 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) > add_files_state.new_tags = notmuch_config_get_new_tags (config, _files_state.new_tags_length); > add_files_state.new_ignore = notmuch_config_get_new_ignore (config, _files_state.new_ignore_length); > add_files_state.synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config); > +add_files_state.add_as_tag_flags = notmuch_config_get_maildir_add_as_tag_flags (config); > db_path = notmuch_config_get_database_path (config); > > if (run_hooks) { > -- > 1.8.0 > > ___ > notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121026/0aee6127/attachment.html>

[PATCH 0/2] automatic tagging based on imap maildir

2012-10-26 Thread David Bremner
Amadeusz ?o?nowski writes: > Is this what Teythoon's afew [0] does (and lots more)? > > [0] https://github.com/teythoon/afew/ Perhaps this is obvious to everyone, but just in case. Even if a patch series did duplicate exactly functionality in afew (and I don't know whether it does or not), we

[PATCH 0/2] automatic tagging based on imap maildir

2012-10-26 Thread Amadeusz Żołnowski
A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121026/40965b38/attachment-0001.pgp>

[PATCH 2/2] News for restrictions on tag names

2012-10-26 Thread Austin Clements
--- NEWS | 14 ++ 1 file changed, 14 insertions(+) diff --git a/NEWS b/NEWS index 2b50ba3..ebd5c1e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +Notmuch 0.15 (-MM-DD) += + +Command-Line Interface +-- + +Empty tag names and tags

[PATCH 1/2] tag: Disallow adding malformed tags to messages

2012-10-26 Thread Austin Clements
This disallows adding empty tags, since nothing but confusion follows in their wake, and disallows adding tags that begin with "-" because they are also confusing, the tag "-" is impossible to remove using the CLI, and because the syntax for removing such tags conflicts with long argument syntax.

[PATCH 3/3] emacs: Escape tag queries suggested by tab completion

2012-10-26 Thread Austin Clements
--- emacs/notmuch.el |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index a8a85ce..60e8bf9 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -917,7 +917,7 @@ PROMPT is the string to prompt with." (append (list "folder:"

[PATCH 2/3] emacs: Escape tag queries performed by hello

2012-10-26 Thread Austin Clements
--- emacs/notmuch-hello.el |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 052aaeb..be50aae 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -500,7 +500,7 @@ Complete list of currently available key

[PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread Michal Nazarewicz
_ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Micha? ?mina86? Nazarewicz(o o) ooo +--ooO--(_)--Ooo-- -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121026/80a0a639/attachment.pgp>

[PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread David Bremner
Taesoo Kim writes: > Since gmail will provide labels as imap sub/folders, notmuch also can > take advantage of labels as tags, when maildir.add_as_tag_flags is > specified. > Hi Taesoo; Welcome to the list! What happens with your patch when a tag is deleted, either by moving the mesage in the

Re: [PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread David Bremner
Taesoo Kim tae...@mit.edu writes: Since gmail will provide labels as imap sub/folders, notmuch also can take advantage of labels as tags, when maildir.add_as_tag_flags is specified. Hi Taesoo; Welcome to the list! What happens with your patch when a tag is deleted, either by moving the

Re: [PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread Michal Nazarewicz
On Fri, Oct 26 2012, Taesoo Kim tae...@mit.edu wrote: @@ -240,6 +242,32 @@ _entry_in_ignore_list (const char *entry, add_files_state_t *state) return FALSE; } +static void +_add_maildir_as_tag(notmuch_database_t *notmuch, + notmuch_message_t *msg, const char *path)

Re: [PATCH 0/2] automatic tagging based on imap maildir

2012-10-26 Thread Amadeusz Żołnowski
Quoting Taesoo Kim (2012-10-26 01:33:57) To use gmail's label (imap maildir), parse maildir and add some tags as gmail's labels. Is this what Teythoon's afew [0] does (and lots more)? [0] https://github.com/teythoon/afew/ -- Amadeusz Żołnowski signature.asc Description: signature

Re: [PATCH 1/2] Automatic tagging based on maildir

2012-10-26 Thread Jani Nikula
On Oct 26, 2012 8:46 AM, Taesoo Kim tae...@mit.edu wrote: Since gmail will provide labels as imap sub/folders, notmuch also can take advantage of labels as tags, when maildir.add_as_tag_flags is specified. Why not use the folder: prefix? What does your patch do that can't be achieved with

[PATCH 1/3] emacs: Introduce generic boolean term escaping function

2012-10-26 Thread Austin Clements
Currently, we only properly escape stashed id queries, but there are other places where the Emacs UI constructs queries for boolean terms. Since this escaping function is meant to be used in other places, it avoids escaping strings that don't need escaping. --- emacs/notmuch-lib.el | 16

[PATCH 3/3] emacs: Escape tag queries suggested by tab completion

2012-10-26 Thread Austin Clements
--- emacs/notmuch.el |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index a8a85ce..60e8bf9 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -917,7 +917,7 @@ PROMPT is the string to prompt with. (append (list folder:

[PATCH 2/3] emacs: Escape tag queries performed by hello

2012-10-26 Thread Austin Clements
--- emacs/notmuch-hello.el |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 052aaeb..be50aae 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -500,7 +500,7 @@ Complete list of currently available key

[PATCH 1/2] tag: Disallow adding malformed tags to messages

2012-10-26 Thread Austin Clements
This disallows adding empty tags, since nothing but confusion follows in their wake, and disallows adding tags that begin with - because they are also confusing, the tag - is impossible to remove using the CLI, and because the syntax for removing such tags conflicts with long argument syntax.

[PATCH 2/2] News for restrictions on tag names

2012-10-26 Thread Austin Clements
--- NEWS | 14 ++ 1 file changed, 14 insertions(+) diff --git a/NEWS b/NEWS index 2b50ba3..ebd5c1e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +Notmuch 0.15 (-MM-DD) += + +Command-Line Interface +-- + +Empty tag names and tags

Re: [PATCH 1/3] emacs: Introduce generic boolean term escaping function

2012-10-26 Thread Tomi Ollila
On Fri, Oct 26 2012, Austin Clements wrote: Currently, we only properly escape stashed id queries, but there are other places where the Emacs UI constructs queries for boolean terms. Since this escaping function is meant to be used in other places, it avoids escaping strings that don't need

Re: [PATCH 1/2] tag: Disallow adding malformed tags to messages

2012-10-26 Thread Tomi Ollila
On Fri, Oct 26 2012, Austin Clements wrote: This disallows adding empty tags, since nothing but confusion follows in their wake, and disallows adding tags that begin with - because they are also confusing, the tag - is impossible to remove using the CLI, and because the syntax for removing

Re: [PATCH 0/2] automatic tagging based on imap maildir

2012-10-26 Thread David Bremner
Amadeusz Żołnowski aide...@aidecoe.name writes: Is this what Teythoon's afew [0] does (and lots more)? [0] https://github.com/teythoon/afew/ Perhaps this is obvious to everyone, but just in case. Even if a patch series did duplicate exactly functionality in afew (and I don't know whether it

Re: [PATCH 1/2] tag: Disallow adding malformed tags to messages

2012-10-26 Thread Ethan Glasser-Camp
Tomi Ollila tomi.oll...@iki.fi writes: LGTM (NEWS too) Yep! Removing needs-review. Ethan ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch