* [PATCH 0/5] Disable search.exclude_tags for 0.12
@ 2012-02-29 18:13 Mark Walters
2012-02-29 18:13 ` [PATCH 1/5] config: disable addition of exclude tags " Mark Walters
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Mark Walters @ 2012-02-29 18:13 UTC (permalink / raw)
To: notmuch
As requested by David (Bremner) on irc here is a patch series
disabling the search.exclude_tags feature as a temporary measure for
the 0.12 release.
There are two options:
The first is to disable the addition of the new search.exclude_tags
item to the config file and stop setup from asking for it.
The second is to do the above and also disable the functionality in
notmuch-search.c and notmuch-count.c.
The idea is that this these are minimal (and thus relatively safe)
changes to make. With the first option users who have configured the
functionality for themselves (while using git) will still get the
feature: it just won't be pushed on users. With the second option the
festure will be completely disabled.
Essentially patch 1 implements the first option and patch 4 the second
option. The other patches in the series update the NEWS file, the man
page and the tests. If going for the first option then I would suggest
applying (in addition to patch 1) patch 2 (NEWS) and probably patch 3
(man) although as the functionality remains the latter is not strictly
necessary. The test patch (patch 5) is not necessary as the tests set
search.exclude_tags directly.
If going for the second option then all the patches are needed.
Finally, please could someone familiar with the config/setup code
check patch 1 carefully. I have never looked at that code before and
could easily have done something stupid.
Best wishes
Mark
Mark Walters (5):
config: disable addition of exclude tags for 0.12
NEWS: revert NEWS item for exclude tags for 0.12
man: remove search.exclude_tags from notmuch-config.1 for 0.12
cli: temporarily remove exclude tag support for 0.12
test: mark exclude tests broken for 0.12
NEWS | 18 ------------------
man/man1/notmuch-config.1 | 8 --------
notmuch-config.c | 3 +--
notmuch-count.c | 8 +-------
notmuch-search.c | 8 +-------
notmuch-setup.c | 19 +------------------
test/search | 2 ++
7 files changed, 6 insertions(+), 60 deletions(-)
--
1.7.2.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] config: disable addition of exclude tags for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
@ 2012-02-29 18:13 ` Mark Walters
2012-02-29 18:13 ` [PATCH 2/5] NEWS: revert NEWS item for " Mark Walters
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mark Walters @ 2012-02-29 18:13 UTC (permalink / raw)
To: notmuch
This disables the addition of search_exclude_tags in notmuch-setup and
notmuch-config.
---
notmuch-config.c | 3 +--
notmuch-setup.c | 19 +------------------
2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/notmuch-config.c b/notmuch-config.c
index e9b2750..61fda3e 100644
--- a/notmuch-config.c
+++ b/notmuch-config.c
@@ -377,8 +377,7 @@ notmuch_config_open (void *ctx,
if (notmuch_config_get_search_exclude_tags (config, &tmp) == NULL) {
if (is_new) {
- const char *tags[] = { "deleted", "spam" };
- notmuch_config_set_search_exclude_tags (config, tags, 2);
+ /* We do not set default search_exclude_tags for 0.12 */
} else {
notmuch_config_set_search_exclude_tags (config, NULL, 0);
}
diff --git a/notmuch-setup.c b/notmuch-setup.c
index 94d0aa7..307231d 100644
--- a/notmuch-setup.c
+++ b/notmuch-setup.c
@@ -133,8 +133,6 @@ notmuch_setup_command (unused (void *ctx),
int is_new;
const char **new_tags;
size_t new_tags_len;
- const char **search_exclude_tags;
- size_t search_exclude_tags_len;
#define prompt(format, ...) \
do { \
@@ -211,22 +209,7 @@ notmuch_setup_command (unused (void *ctx),
}
- search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_len);
-
- printf ("Tags to exclude when searching messages (separated by spaces) [");
- print_tag_list (search_exclude_tags, search_exclude_tags_len);
- prompt ("]: ");
-
- if (strlen (response)) {
- GPtrArray *tags = parse_tag_list (ctx, response);
-
- notmuch_config_set_search_exclude_tags (config,
- (const char **) tags->pdata,
- tags->len);
-
- g_ptr_array_free (tags, TRUE);
- }
-
+ /* Temporarily remove exclude tag support for 0.12 */
if (! notmuch_config_save (config)) {
if (is_new)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] NEWS: revert NEWS item for exclude tags for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
2012-02-29 18:13 ` [PATCH 1/5] config: disable addition of exclude tags " Mark Walters
@ 2012-02-29 18:13 ` Mark Walters
2012-02-29 18:13 ` [PATCH 3/5] man: remove search.exclude_tags from notmuch-config.1 " Mark Walters
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mark Walters @ 2012-02-29 18:13 UTC (permalink / raw)
To: notmuch
---
NEWS | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/NEWS b/NEWS
index b2bec04..5fa8043 100644
--- a/NEWS
+++ b/NEWS
@@ -11,24 +11,6 @@ Reply to sender
to all. The feature is available through the new command line option
--reply-to=(all|sender).
-Tag exclusion
-
- Tags can be automatically excluded from search results by adding them
- to the new 'search.exclude_tags' option in the Notmuch config file.
-
- This behaviour can be overridden by explicitly including an excluded
- tag in your query, for example:
-
- notmuch search $your_query and tag:$excluded_tag
-
- Existing users will probably want to run "notmuch setup" again to add
- the new well-commented [search] section to the configuration file.
-
- For new configurations, accepting the default setting will cause the
- tags "deleted" and "spam" to be excluded, equivalent to running:
-
- notmuch config set search.exclude_tags deleted spam
-
Mail store folder/file ignore
A new configuration option, `new.ignore`, lets users specify a
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] man: remove search.exclude_tags from notmuch-config.1 for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
2012-02-29 18:13 ` [PATCH 1/5] config: disable addition of exclude tags " Mark Walters
2012-02-29 18:13 ` [PATCH 2/5] NEWS: revert NEWS item for " Mark Walters
@ 2012-02-29 18:13 ` Mark Walters
2012-02-29 18:13 ` [PATCH 4/5] cli: temporarily remove exclude tag support " Mark Walters
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mark Walters @ 2012-02-29 18:13 UTC (permalink / raw)
To: notmuch
---
man/man1/notmuch-config.1 | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/man/man1/notmuch-config.1 b/man/man1/notmuch-config.1
index 0260eb7..36e09f4 100644
--- a/man/man1/notmuch-config.1
+++ b/man/man1/notmuch-config.1
@@ -85,14 +85,6 @@ directory hierarchy.
.RS 4
.TP 4
-.B search.exclude
-A list of tags that will be excluded from search results by
-default. Using an excluded tag in a query will override that
-exclusion.
-.RE
-
-.RS 4
-.TP 4
.B maildir.synchronize_flags
If true, then the following maildir flags (in message filenames) will
be synchronized with the corresponding notmuch tags:
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] cli: temporarily remove exclude tag support for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
` (2 preceding siblings ...)
2012-02-29 18:13 ` [PATCH 3/5] man: remove search.exclude_tags from notmuch-config.1 " Mark Walters
@ 2012-02-29 18:13 ` Mark Walters
2012-02-29 18:13 ` [PATCH 5/5] test: mark exclude tests broken " Mark Walters
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mark Walters @ 2012-02-29 18:13 UTC (permalink / raw)
To: notmuch
---
notmuch-count.c | 8 +-------
notmuch-search.c | 8 +-------
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/notmuch-count.c b/notmuch-count.c
index 63459fb..f86cb40 100644
--- a/notmuch-count.c
+++ b/notmuch-count.c
@@ -35,9 +35,6 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
char *query_str;
int opt_index;
int output = OUTPUT_MESSAGES;
- const char **search_exclude_tags;
- size_t search_exclude_tags_length;
- unsigned int i;
notmuch_opt_desc_t options[] = {
{ NOTMUCH_OPT_KEYWORD, &output, "output", 'o',
@@ -78,10 +75,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
return 1;
}
- search_exclude_tags = notmuch_config_get_search_exclude_tags
- (config, &search_exclude_tags_length);
- for (i = 0; i < search_exclude_tags_length; i++)
- notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
+ /* Temporarily remove exclude tag support for 0.12 */
switch (output) {
case OUTPUT_MESSAGES:
diff --git a/notmuch-search.c b/notmuch-search.c
index 92ce38a..96892b3 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -426,9 +426,6 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
output_t output = OUTPUT_SUMMARY;
int offset = 0;
int limit = -1; /* unlimited */
- const char **search_exclude_tags;
- size_t search_exclude_tags_length;
- unsigned int i;
enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
format_sel = NOTMUCH_FORMAT_TEXT;
@@ -496,10 +493,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
notmuch_query_set_sort (query, sort);
- search_exclude_tags = notmuch_config_get_search_exclude_tags
- (config, &search_exclude_tags_length);
- for (i = 0; i < search_exclude_tags_length; i++)
- notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
+ /* Temporarily remove exclude tag support for 0.12 */
switch (output) {
default:
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] test: mark exclude tests broken for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
` (3 preceding siblings ...)
2012-02-29 18:13 ` [PATCH 4/5] cli: temporarily remove exclude tag support " Mark Walters
@ 2012-02-29 18:13 ` Mark Walters
2012-03-01 8:48 ` [PATCH 0/5] Disable search.exclude_tags " Tomi Ollila
2012-03-03 16:25 ` David Bremner
6 siblings, 0 replies; 8+ messages in thread
From: Mark Walters @ 2012-02-29 18:13 UTC (permalink / raw)
To: notmuch
---
test/search | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/test/search b/test/search
index 414be35..c55522b 100755
--- a/test/search
+++ b/test/search
@@ -130,6 +130,7 @@ output=$(notmuch search "bödý" | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"
test_begin_subtest "Exclude \"deleted\" messages from search"
+test_subtest_known_broken
notmuch config set search.exclude_tags = deleted
generate_message '[subject]="Not deleted"'
generate_message '[subject]="Deleted"'
@@ -143,6 +144,7 @@ output=$(notmuch search subject:deleted and tag:deleted | notmuch_search_sanitiz
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Deleted (deleted inbox unread)"
test_begin_subtest "Exclude \"deleted\" messages from threads"
+test_subtest_known_broken
add_message '[subject]="Not deleted reply"' '[in-reply-to]="<$gen_msg_id>"'
output=$(notmuch search subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Disable search.exclude_tags for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
` (4 preceding siblings ...)
2012-02-29 18:13 ` [PATCH 5/5] test: mark exclude tests broken " Mark Walters
@ 2012-03-01 8:48 ` Tomi Ollila
2012-03-03 16:25 ` David Bremner
6 siblings, 0 replies; 8+ messages in thread
From: Tomi Ollila @ 2012-03-01 8:48 UTC (permalink / raw)
To: Mark Walters, notmuch
On Wed, 29 Feb 2012 18:13:04 +0000, Mark Walters <markwalters1009@gmail.com> wrote:
> As requested by David (Bremner) on irc here is a patch series
> disabling the search.exclude_tags feature as a temporary measure for
> the 0.12 release.
>
> There are two options:
>
> The first is to disable the addition of the new search.exclude_tags
> item to the config file and stop setup from asking for it.
>
> The second is to do the above and also disable the functionality in
> notmuch-search.c and notmuch-count.c.
I first thought that "full" revert would be best in order to reduce
confusion, but now I'd vote for just disabling the addition but leaving
the feature there.
This way the bleeding edge users who already use this feature could
test the release branch version in daily use. As the feature is there
some brave future 0.12 users can start experimenting with it earlyer
and potentially provide feedback. Finally, as the delta is smaller
there is less management activities to be done.
Marking the feature as 'experimental' in namual page & other documentation
would be good idea.
Tomi
> The idea is that this these are minimal (and thus relatively safe)
> changes to make. With the first option users who have configured the
> functionality for themselves (while using git) will still get the
> feature: it just won't be pushed on users. With the second option the
> festure will be completely disabled.
>
> Essentially patch 1 implements the first option and patch 4 the second
> option. The other patches in the series update the NEWS file, the man
> page and the tests. If going for the first option then I would suggest
> applying (in addition to patch 1) patch 2 (NEWS) and probably patch 3
> (man) although as the functionality remains the latter is not strictly
> necessary. The test patch (patch 5) is not necessary as the tests set
> search.exclude_tags directly.
>
> If going for the second option then all the patches are needed.
>
> Finally, please could someone familiar with the config/setup code
> check patch 1 carefully. I have never looked at that code before and
> could easily have done something stupid.
>
> Best wishes
>
> Mark
>
> Mark Walters (5):
> config: disable addition of exclude tags for 0.12
> NEWS: revert NEWS item for exclude tags for 0.12
> man: remove search.exclude_tags from notmuch-config.1 for 0.12
> cli: temporarily remove exclude tag support for 0.12
> test: mark exclude tests broken for 0.12
>
> NEWS | 18 ------------------
> man/man1/notmuch-config.1 | 8 --------
> notmuch-config.c | 3 +--
> notmuch-count.c | 8 +-------
> notmuch-search.c | 8 +-------
> notmuch-setup.c | 19 +------------------
> test/search | 2 ++
> 7 files changed, 6 insertions(+), 60 deletions(-)
>
> --
> 1.7.2.3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Disable search.exclude_tags for 0.12
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
` (5 preceding siblings ...)
2012-03-01 8:48 ` [PATCH 0/5] Disable search.exclude_tags " Tomi Ollila
@ 2012-03-03 16:25 ` David Bremner
6 siblings, 0 replies; 8+ messages in thread
From: David Bremner @ 2012-03-03 16:25 UTC (permalink / raw)
To: Mark Walters, notmuch
On Wed, 29 Feb 2012 18:13:04 +0000, Mark Walters <markwalters1009@gmail.com> wrote:
> As requested by David (Bremner) on irc here is a patch series
> disabling the search.exclude_tags feature as a temporary measure for
> the 0.12 release.
>
> There are two options:
>
> The first is to disable the addition of the new search.exclude_tags
> item to the config file and stop setup from asking for it.
>
This is the option I chose. I pushed the first 3 patches in the series
and marked the others obsolete.
d
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-03-03 16:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 18:13 [PATCH 0/5] Disable search.exclude_tags for 0.12 Mark Walters
2012-02-29 18:13 ` [PATCH 1/5] config: disable addition of exclude tags " Mark Walters
2012-02-29 18:13 ` [PATCH 2/5] NEWS: revert NEWS item for " Mark Walters
2012-02-29 18:13 ` [PATCH 3/5] man: remove search.exclude_tags from notmuch-config.1 " Mark Walters
2012-02-29 18:13 ` [PATCH 4/5] cli: temporarily remove exclude tag support " Mark Walters
2012-02-29 18:13 ` [PATCH 5/5] test: mark exclude tests broken " Mark Walters
2012-03-01 8:48 ` [PATCH 0/5] Disable search.exclude_tags " Tomi Ollila
2012-03-03 16:25 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).