On Mon, 24 Dec 2012, da...@tethera.net wrote:
These obsolete
id:1355196820-29734-1-git-send-email-da...@tethera.net
I tried to follow the suggestions of
id:20121216191121.gh6...@mit.edu
pretty closely.
LGTM. In the long run, I wonder if we want to separate the time and
On Sun, 23 Dec 2012, Mark Walters markwalters1...@gmail.com wrote:
---
Here is some news for the recent part visibility change. I am not
completely happy with the wording so please do read. In particular
should it mention how the user's preferred part is chosen
On Mon, 24 Dec 2012, David Bremner da...@tethera.net wrote:
Mark Walters markwalters1...@gmail.com writes:
I think this is a bug but that could be debated. It is particularly
easy to trigger with notmuch pick because that uses the split pane
while focus usually remains in the `pick' pane
Wording suggested by Austin.
---
I have taken Austin's (excellent) wording and agree with the
downplaying of notmuch-show-all-multipart/alternative-parts.
Best wishes
Mark
NEWS | 11 +++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index
We add a hook to the show buffer in the message window to close the
message window when that buffer quits. It checks that the
message-window is still displaying the show-message buffer and then
closes it.
---
This is just a slightly tidier version of the previous patch. It is
more natural to
On Tue, Dec 25 2012, Mark Walters markwalters1...@gmail.com wrote:
We add a hook to the show buffer in the message window to close the
message window when that buffer quits. It checks that the
message-window is still displaying the show-message buffer and then
closes it.
---
This is just a
Austin Clements amdra...@mit.edu writes:
This could live in tag-util as well, but it is really nothing specific
to tags (although the conventions are specific to Xapian).
Furthermore, this now combines the term prefix with the quoted term;
arguably this is just as easy to do in the caller,
Austin Clements amdra...@mit.edu writes:
On Mon, 24 Dec 2012, da...@tethera.net wrote:
LGTM. In the long run, I wonder if we want to separate the time and
memory tests like this or if some tests would make sense in either mode.
pushed. At the moment, the split into time versus memory tests
Austin Clements amdra...@mit.edu writes:
+if (consume_double_quote (pos)) {
+ char *out = talloc_strdup (ctx, pos);
+ pos = *term_out = out;
+ while (1) {
Overall the control flow here is a bit tricky to follow. I'm not sure if
a real loop condition would help or make it
Austin Clements amdra...@mit.edu writes:
randomchar = random_unichar ();
+ if (randomchar == '\n')
+ randomchar = 'x';
what about something like
do {
randomchar = random_unichar ();
} while (randomchar == '\n');
___
David Bremner da...@tethera.net writes:
So if there is no quote, we skip the part after the ':'? I guess I
probably missed something because that doesn't sound like the intended
behaviour.
Indeed the following addition to the test shows it works fine in
context. So I guess I just don't follow
Overall I agree this is conceptually cleaner. Transforming between
quoting formats is inherently delicate; I suspect there will always be
at least one special case missed. I did find the dequoting code a bit
baffling, but this is more of an implementation issue.
There is a certain cognitive
David Bremner da...@tethera.net writes:
There is a certain cognitive dissonance in using hex-quoting for tags
and xapian-quoting for message-ids. Did you think about the
implications of using xapian quoting for tags as well?
At risk of talking to myself, I guess one loses the space
Austin Clements amdra...@mit.edu writes:
---
man/man1/notmuch-dump.1 | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
I guess the short description in notmuch-restore.1 needs updating as
well.
___
notmuch mailing list
This is an alternative version of
id:1356313183-9266-1-git-send-email-da...@tethera.net
batch tagging patches rebased on top of
id:1356415076-5692-1-git-send-email-amdra...@mit.edu
This mainly consisted of removing
[Patch v9 04/17] notmuch-tag: factor out double quoting
From: David Bremner brem...@debian.org
This is essentially cosmetic, since success=0 is promised by
the comments in tag-utils.h.
---
tag-util.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tag-util.c b/tag-util.c
index e4e5dda..ca12b3b 100644
--- a/tag-util.c
+++
From: David Bremner brem...@debian.org
Command line parsing is factored out into a function
parse_tag_command_line in tag-utils.c.
There is some duplicated code eliminated in tag_query, and a bunch of
translation from using the bare tag_op structs to using that tag-utils
API.
---
notmuch-tag.c
From: David Bremner brem...@debian.org
This will allow us to be consistent between batch tagging and command
line tagging as far as what is an illegal tag.
---
tag-util.c | 36 +++-
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/tag-util.c
From: David Bremner brem...@debian.org
This is based on the similar test for notmuch restore, but the parser
in batch tagging mode is less tolerant of a few cases, in particular
those tested by illegal_tag.
---
test/tagging | 35 +++
1 file changed, 35
From: David Bremner brem...@debian.org
The (now fixed) bug that this test revealed is that unquoted
message-ids with whitespace or other control characters in them are
split into several tokens by the Xapian query parser.
---
test/tagging | 18 ++
1 file changed, 18
From: David Bremner brem...@debian.org
Consistently use [...]; one less space. Use singular search-term
---
man/man1/notmuch-tag.1 |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1
index 0f86582..9444aa4 100644
---
From: Jani Nikula j...@nikula.org
Add support for batch tagging operations through stdin to notmuch
tag. This can be enabled with the new --batch command line option to
notmuch tag. The input must consist of lines of the format:
+tag|-tag [...] [--] query [...]
Each line is interpreted
From: David Bremner brem...@debian.org
This tests argument parsing, blank lines and comments, and basic hex
decoding functionality.
---
test/tagging | 51 +++
1 file changed, 51 insertions(+)
diff --git a/test/tagging b/test/tagging
index
From: David Bremner brem...@debian.org
This test also serves as documentation of the quoting
requirements. The comment lines are so that it exactly matches the man
page. Nothing more embarrassing than having an example in the man page
fail.
---
test/tagging | 25 +
1
From: Jani Nikula j...@nikula.org
---
man/man1/notmuch-tag.1 | 92
1 file changed, 92 insertions(+)
diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1
index 9444aa4..3aa2fa5 100644
--- a/man/man1/notmuch-tag.1
+++
Mark Walters markwalters1...@gmail.com writes:
Wording suggested by Austin.
---
pushed.
d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch
On Sat, Dec 22 2012, Mark Walters markwalters1...@gmail.com wrote:
view-mode-enter changed between emacs 23 and emacs 24: the current
code makes the error buffer disappear in emacs 24 on quitting it (ie
pressing q) but this just kills the buffer without closing the split
window in emacs 23.
Quoth David Bremner on Dec 25 at 10:18 am:
Austin Clements amdra...@mit.edu writes:
+if (consume_double_quote (pos)) {
+ char *out = talloc_strdup (ctx, pos);
+ pos = *term_out = out;
+ while (1) {
Overall the control flow here is a bit tricky to follow. I'm not sure if
a
Mark Walters markwalters1...@gmail.com writes:
We add a hook to the show buffer in the message window to close the
message window when that buffer quits. It checks that the
message-window is still displaying the show-message buffer and then
closes it.
pushed.
d
This parses the subset of Xapian's boolean term quoting rules that are
used by make_boolean_term. This is provided as a generic string
utility, but will be used shortly in notmuch restore to parse and
optimize for ID queries.
---
util/string-util.c | 51
Describe the new batch-tag format. For notmuch-restore, rather than
half-heartedly duplicating the description, we now cite notmuch-dump.
---
man/man1/notmuch-dump.1| 11 +++
man/man1/notmuch-restore.1 |6 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git
From: Austin Clements amdra...@mit.edu
This is now a generic boolean term quoting function. It performs
minimal quoting to produce user-friendly queries.
This could live in tag-util as well, but it is really nothing specific
to tags (although the conventions are specific to Xapian).
The API is
This obsoletes
id:1356415076-5692-1-git-send-email-amdra...@mit.edu
In addition to incorporating all of David's suggestions, this reworks
the boolean term parsing so it only handles the subset of quoting
syntax used by make_boolean_term (which also happens to be all that we
described in the
This switches the new batch-tag format away from using a home-grown
hex-encoding scheme for message IDs in the dump to simply using Xapian
queries with Xapian quoting syntax.
This has a variety of advantages beyond presenting a cleaner and more
consistent interface. Foremost is that it will
This is a stab at tweaking the new batch-tag dump/restore format to be
more amenable to batch tagging. Currently, the "query" part of each
line isn't really a Xapian query; it's a hex-encoded message ID
prefixed with "id:". This is fine for the very limited case of
dump/restore, but it extends
When we switch to using regular Xapian queries in the dump format, \n
will cause problems, so we disallow it. Specially, while Xapian can
quote and parse queries containing \n without difficultly, quoted
queries containing \n still span multiple lines, which breaks the
line-orientedness of the
---
man/man1/notmuch-dump.1 | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/man/man1/notmuch-dump.1 b/man/man1/notmuch-dump.1
index 770b00f..7bd6def 100644
--- a/man/man1/notmuch-dump.1
+++ b/man/man1/notmuch-dump.1
@@ -64,13 +64,16 @@ and tags containing
This reproduces Xapian's parsing rules for boolean term queries. This
is provided as a generic string utility, but will be used shortly in
notmuch restore to parse and optimize for ID queries.
---
util/string-util.c | 63
util/string-util.h
This switches the new batch-tag format away from using a home-grown
hex-encoding scheme for message IDs in the dump to simply using Xapian
queries with Xapian quoting syntax.
This has a variety of advantages beyond presenting a cleaner and more
consistent interface. Foremost is that it will
From: Austin Clements
This is now a generic boolean term quoting function. It performs
minimal quoting to produce user-friendly queries.
This could live in tag-util as well, but it is really nothing specific
to tags (although the conventions are specific to Xapian).
The API
On Mon, 24 Dec 2012, david at tethera.net wrote:
> These obsolete
>
> id:1355196820-29734-1-git-send-email-david at tethera.net
>
> I tried to follow the suggestions of
>
> id:20121216191121.GH6187 at mit.edu
>
> pretty closely.
LGTM. In the long run, I wonder if we want to
On Sun, 23 Dec 2012, Mark Walters wrote:
> ---
> Here is some news for the recent part visibility change. I am not
> completely happy with the wording so please do read. In particular
> should it mention how the user's preferred part is chosen
> (notmuch-multipart/alternative-discouraged etc)?
>
Wording suggested by Austin.
---
I have taken Austin's (excellent) wording and agree with the
downplaying of notmuch-show-all-multipart/alternative-parts.
Best wishes
Mark
NEWS | 11 +++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index
We add a hook to the show buffer in the message window to close the
message window when that buffer quits. It checks that the
message-window is still displaying the show-message buffer and then
closes it.
---
This is just a slightly tidier version of the previous patch. It is
more natural to
On Tue, Dec 25 2012, Mark Walters wrote:
> We add a hook to the show buffer in the message window to close the
> message window when that buffer quits. It checks that the
> message-window is still displaying the show-message buffer and then
> closes it.
> ---
> This is just a slightly tidier
Austin Clements writes:
>
> This could live in tag-util as well, but it is really nothing specific
> to tags (although the conventions are specific to Xapian).
>
> Furthermore, this now combines the term prefix with the quoted term;
> arguably this is just as easy to do in the caller, but this
Austin Clements writes:
> On Mon, 24 Dec 2012, david at tethera.net wrote:
>
> LGTM. In the long run, I wonder if we want to separate the time and
> memory tests like this or if some tests would make sense in either mode.
pushed. At the moment, the split into time versus memory tests is a
Austin Clements writes:
> +if (consume_double_quote ()) {
> + char *out = talloc_strdup (ctx, pos);
> + pos = *term_out = out;
> + while (1) {
Overall the control flow here is a bit tricky to follow. I'm not sure if
a real loop condition would help or make it worse.
> +
Austin Clements writes:
>
> randomchar = random_unichar ();
> + if (randomchar == '\n')
> + randomchar = 'x';
>
what about something like
do {
randomchar = random_unichar ();
} while (randomchar == '\n');
David Bremner writes:
>
> So if there is no quote, we skip the part after the ':'? I guess I
> probably missed something because that doesn't sound like the intended
> behaviour.
Indeed the following addition to the test shows it works fine in
context. So I guess I just don't follow this control
Overall I agree this is conceptually cleaner. Transforming between
quoting formats is inherently delicate; I suspect there will always be
at least one special case missed. I did find the dequoting code a bit
baffling, but this is more of an implementation issue.
There is a certain cognitive
David Bremner writes:
>
> There is a certain cognitive dissonance in using hex-quoting for tags
> and xapian-quoting for message-ids. Did you think about the
> implications of using xapian quoting for tags as well?
>
At risk of talking to myself, I guess one loses the space delimited
lists of
Austin Clements writes:
> ---
> man/man1/notmuch-dump.1 | 11 +++
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
I guess the short description in notmuch-restore.1 needs updating as
well.
This is an alternative version of
id:1356313183-9266-1-git-send-email-david at tethera.net
batch tagging patches rebased on top of
id:1356415076-5692-1-git-send-email-amdragon at mit.edu
This mainly consisted of removing
[Patch v9 04/17] notmuch-tag: factor out double
From: David Bremner
This is essentially cosmetic, since success=0 is promised by
the comments in tag-utils.h.
---
tag-util.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tag-util.c b/tag-util.c
index e4e5dda..ca12b3b 100644
--- a/tag-util.c
+++
From: David Bremner
Command line parsing is factored out into a function
parse_tag_command_line in tag-utils.c.
There is some duplicated code eliminated in tag_query, and a bunch of
translation from using the bare tag_op structs to using that tag-utils
API.
---
From: David Bremner
This will allow us to be consistent between batch tagging and command
line tagging as far as what is an illegal tag.
---
tag-util.c | 36 +++-
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/tag-util.c
From: David Bremner
This is based on the similar test for notmuch restore, but the parser
in batch tagging mode is less tolerant of a few cases, in particular
those tested by illegal_tag.
---
test/tagging | 35 +++
1 file changed, 35
From: David Bremner
The (now fixed) bug that this test revealed is that unquoted
message-ids with whitespace or other control characters in them are
split into several tokens by the Xapian query parser.
---
test/tagging | 18 ++
1 file changed, 18
From: David Bremner
Consistently use [...]; one less space. Use singular
---
man/man1/notmuch-tag.1 |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1
index 0f86582..9444aa4 100644
---
From: David Bremner
We test quotes seperately because they matter to the query escaper.
---
test/tagging | 66 ++
1 file changed, 66 insertions(+)
diff --git a/test/tagging b/test/tagging
index 405ad7c..417112b
From: Jani Nikula
Add support for batch tagging operations through stdin to "notmuch
tag". This can be enabled with the new --batch command line option to
"notmuch tag". The input must consist of lines of the format:
+|- [...] [--] [...]
Each line is interpreted similarly to
From: David Bremner
This tests argument parsing, blank lines and comments, and basic hex
decoding functionality.
---
test/tagging | 51 +++
1 file changed, 51 insertions(+)
diff --git a/test/tagging b/test/tagging
index
From: David Bremner
This test also serves as documentation of the quoting
requirements. The comment lines are so that it exactly matches the man
page. Nothing more embarrassing than having an example in the man page
fail.
---
test/tagging | 25 +
1
From: Jani Nikula
---
man/man1/notmuch-tag.1 | 92
1 file changed, 92 insertions(+)
diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1
index 9444aa4..3aa2fa5 100644
--- a/man/man1/notmuch-tag.1
+++
Mark Walters writes:
> Wording suggested by Austin.
> ---
pushed.
d
On Sat, Dec 22 2012, Mark Walters wrote:
> view-mode-enter changed between emacs 23 and emacs 24: the current
> code makes the error buffer disappear in emacs 24 on quitting it (ie
> pressing q) but this just kills the buffer without closing the split
> window in emacs 23.
>
> This patch makes
Quoth David Bremner on Dec 25 at 10:18 am:
> Austin Clements writes:
>
> > +if (consume_double_quote ()) {
> > + char *out = talloc_strdup (ctx, pos);
> > + pos = *term_out = out;
> > + while (1) {
>
> Overall the control flow here is a bit tricky to follow. I'm not sure if
> a real
Mark Walters writes:
> We add a hook to the show buffer in the message window to close the
> message window when that buffer quits. It checks that the
> message-window is still displaying the show-message buffer and then
> closes it.
pushed.
d
This parses the subset of Xapian's boolean term quoting rules that are
used by make_boolean_term. This is provided as a generic string
utility, but will be used shortly in notmuch restore to parse and
optimize for ID queries.
---
util/string-util.c | 51
Describe the new batch-tag format. For notmuch-restore, rather than
half-heartedly duplicating the description, we now cite notmuch-dump.
---
man/man1/notmuch-dump.1| 11 +++
man/man1/notmuch-restore.1 |6 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git
From: Austin Clements
This is now a generic boolean term quoting function. It performs
minimal quoting to produce user-friendly queries.
This could live in tag-util as well, but it is really nothing specific
to tags (although the conventions are specific to Xapian).
The API
When we switch to using regular Xapian queries in the dump format, \n
will cause problems, so we disallow it. Specially, while Xapian can
quote and parse queries containing \n without difficultly, quoted
queries containing \n still span multiple lines, which breaks the
line-orientedness of the
This obsoletes
id:1356415076-5692-1-git-send-email-amdragon at mit.edu
In addition to incorporating all of David's suggestions, this reworks
the boolean term parsing so it only handles the subset of quoting
syntax used by make_boolean_term (which also happens to be all that we
described in the
This switches the new batch-tag format away from using a home-grown
hex-encoding scheme for message IDs in the dump to simply using Xapian
queries with Xapian quoting syntax.
This has a variety of advantages beyond presenting a cleaner and more
consistent interface. Foremost is that it will
75 matches
Mail list logo