Xapian-quoting based batch tagging.

2013-01-07 Thread David Bremner
david at tethera.net writes:

> This is essentially just a rebase of 
>
>  id:1356464567-21779-1-git-send-email-david at tethera.net
>
> with some commit-message fixups for 
>
> [Patch v2 3/9] cli: add support for batch tagging operations to

pushed, with one blank line deleted, and one plural corrected, per Tomi
on IRC.

d


Xapian-quoting based batch tagging.

2013-01-07 Thread Jani Nikula
On Mon, 07 Jan 2013, david at tethera.net wrote:
> This is essentially just a rebase of 
>
>  id:1356464567-21779-1-git-send-email-david at tethera.net
>
> with some commit-message fixups for 
>
> [Patch v2 3/9] cli: add support for batch tagging operations to
>
> as suggested by Jani

The series LGTM,
Jani.


Re: Xapian-quoting based batch tagging.

2013-01-07 Thread Jani Nikula
On Mon, 07 Jan 2013, da...@tethera.net wrote:
 This is essentially just a rebase of 

  id:1356464567-21779-1-git-send-email-da...@tethera.net

 with some commit-message fixups for 

 [Patch v2 3/9] cli: add support for batch tagging operations to

 as suggested by Jani

The series LGTM,
Jani.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Xapian-quoting based batch tagging.

2013-01-07 Thread David Bremner
da...@tethera.net writes:

 This is essentially just a rebase of 

  id:1356464567-21779-1-git-send-email-da...@tethera.net

 with some commit-message fixups for 

 [Patch v2 3/9] cli: add support for batch tagging operations to

pushed, with one blank line deleted, and one plural corrected, per Tomi
on IRC.

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Xapian-quoting based batch tagging.

2013-01-06 Thread da...@tethera.net
This is essentially just a rebase of 

 id:1356464567-21779-1-git-send-email-david at tethera.net

with some commit-message fixups for 

[Patch v2 3/9] cli: add support for batch tagging operations to

as suggested by Jani


Xapian-quoting based batch tagging.

2013-01-06 Thread david
This is essentially just a rebase of 

 id:1356464567-21779-1-git-send-email-da...@tethera.net

with some commit-message fixups for 

[Patch v2 3/9] cli: add support for batch tagging operations to

as suggested by Jani
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Xapian-quoting based batch-tagging.

2013-01-03 Thread Jameson Graef Rollins
On Thu, Jan 03 2013, Jani Nikula  wrote:
>>> I am unclear about how this is going to deal with queries containing
>>> newlines. For dump/restore I think this is not a problem (as Austin and
>>> others have said), but for batch tagging I think it could be; for
>>> example the query could be for a tag containing a newline.
>>
>> Yes, that's true, this patch series does not support queries with tags
>> with embedded newlines. They can still be removed (and added) via either
>> batch tagging or the command line. We could just live with this, or
>
> I think we should just live with it. It's a bunch of code with some UI
> wrinkles for a marginal feature.

Tags with newlines are psychotic.  We should just explicitly forbid them
by preventing them from ever being applied and then never have to worry
about them again.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



Xapian-quoting based batch-tagging.

2013-01-03 Thread Jani Nikula
On Tue, 25 Dec 2012, david at tethera.net wrote:
> 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

I didn't go through this quite as thoroughly as the previous versions,
but the series LGTM. I like how this simplifies things. In the future,
I'd like us to support xapian quoting also in the tag changes, for
consistency.

BR,
Jani.



>
> This mainly consisted of removing 
>
>  [Patch v9 04/17] notmuch-tag: factor out double quoting routine
>  (superceded by one of Austin's patches)
>
>  [Patch v9 05/17] util/string-util: add a new string tokenized function
>  [Patch v9 06/17] unhex_and_quote: new function to quote hex-decoded 
> queries
>  [Patch v9 07/17] notmuch-restore: move query handling for batch  
>  (uneeded if query is passed verbatim to xapian)
>
>  I also removed two tests, since they are about how we handle
>  quoting:
>
>  [Patch v9 13/17] test/tagging: add test for compound queries with batch 
> tagging
>  [Patch v9 17/17] test/tagging: add test for handling of parenthesized
> tag queries.
>
> A few small fixes were needed to the tests, and a fair amount of
> changes to the notmuch-tag man page.
>
> Diffstat (against Austin's series) is as follows
>
>  man/man1/notmuch-tag.1 |   99 -
>  notmuch-tag.c  |  169 
>  tag-util.c |   87 +--
>  tag-util.h |   15 
>  test/tagging   |  195 ++
>  5 files changed, 480 insertions(+), 85 deletions(-)
>
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Xapian-quoting based batch-tagging.

2013-01-03 Thread Jani Nikula
On Wed, 26 Dec 2012, David Bremner  wrote:
> Mark Walters  writes:
>
>> I am unclear about how this is going to deal with queries containing
>> newlines. For dump/restore I think this is not a problem (as Austin and
>> others have said), but for batch tagging I think it could be; for
>> example the query could be for a tag containing a newline.
>
> Yes, that's true, this patch series does not support queries with tags
> with embedded newlines. They can still be removed (and added) via either
> batch tagging or the command line. We could just live with this, or

I think we should just live with it. It's a bunch of code with some UI
wrinkles for a marginal feature.

BR,
Jani.


>
> - The current syntax allows for detecting options at the start of the
>   line; perhaps a future fix would be to have the batch tagging and
>   command line tagging accept an optionally hex encoded query, something
>   like:
>
> --hex +found%20it -- tag:%22stupid%0Atag%22
>
> - Alternatively, we could add hex decoding on top of xapian quoting for
>   queries. One UI downside is that people have to remember that % are
>   special.
>
>  +found%25it -- tag:lost%25it
>
>   Another is that quoting is still (surprisingly) necessary for encoded
>   spaces
>   
>  +found%20it -- tag:"lost%20it"
>  
>   Introducing yet another escape format, e.g. "\n" would require more
>   code, and not really much benefit afaict versus re-using hex-encoding.
>   Offhand I don't see how to avoid this without some level of query
>   pre-processing a-la
>   
> id:1356313183-9266-1-git-send-email-david at tethera.net
>
> d
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: Xapian-quoting based batch-tagging.

2013-01-03 Thread Jani Nikula
On Wed, 26 Dec 2012, David Bremner da...@tethera.net wrote:
 Mark Walters markwalters1...@gmail.com writes:

 I am unclear about how this is going to deal with queries containing
 newlines. For dump/restore I think this is not a problem (as Austin and
 others have said), but for batch tagging I think it could be; for
 example the query could be for a tag containing a newline.

 Yes, that's true, this patch series does not support queries with tags
 with embedded newlines. They can still be removed (and added) via either
 batch tagging or the command line. We could just live with this, or

I think we should just live with it. It's a bunch of code with some UI
wrinkles for a marginal feature.

BR,
Jani.



 - The current syntax allows for detecting options at the start of the
   line; perhaps a future fix would be to have the batch tagging and
   command line tagging accept an optionally hex encoded query, something
   like:

 --hex +found%20it -- tag:%22stupid%0Atag%22

 - Alternatively, we could add hex decoding on top of xapian quoting for
   queries. One UI downside is that people have to remember that % are
   special.

  +found%25it -- tag:lost%25it

   Another is that quoting is still (surprisingly) necessary for encoded
   spaces
   
  +found%20it -- tag:lost%20it
  
   Introducing yet another escape format, e.g. \n would require more
   code, and not really much benefit afaict versus re-using hex-encoding.
   Offhand I don't see how to avoid this without some level of query
   pre-processing a-la
   
 id:1356313183-9266-1-git-send-email-da...@tethera.net

 d
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Xapian-quoting based batch-tagging.

2013-01-03 Thread Jani Nikula
On Tue, 25 Dec 2012, da...@tethera.net wrote:
 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

I didn't go through this quite as thoroughly as the previous versions,
but the series LGTM. I like how this simplifies things. In the future,
I'd like us to support xapian quoting also in the tag changes, for
consistency.

BR,
Jani.




 This mainly consisted of removing 

  [Patch v9 04/17] notmuch-tag: factor out double quoting routine
  (superceded by one of Austin's patches)

  [Patch v9 05/17] util/string-util: add a new string tokenized function
  [Patch v9 06/17] unhex_and_quote: new function to quote hex-decoded 
 queries
  [Patch v9 07/17] notmuch-restore: move query handling for batch  
  (uneeded if query is passed verbatim to xapian)

  I also removed two tests, since they are about how we handle
  quoting:

  [Patch v9 13/17] test/tagging: add test for compound queries with batch 
 tagging
  [Patch v9 17/17] test/tagging: add test for handling of parenthesized
 tag queries.

 A few small fixes were needed to the tests, and a fair amount of
 changes to the notmuch-tag man page.

 Diffstat (against Austin's series) is as follows

  man/man1/notmuch-tag.1 |   99 -
  notmuch-tag.c  |  169 
  tag-util.c |   87 +--
  tag-util.h |   15 
  test/tagging   |  195 ++
  5 files changed, 480 insertions(+), 85 deletions(-)


 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Xapian-quoting based batch-tagging.

2013-01-03 Thread Jameson Graef Rollins
On Thu, Jan 03 2013, Jani Nikula j...@nikula.org wrote:
 I am unclear about how this is going to deal with queries containing
 newlines. For dump/restore I think this is not a problem (as Austin and
 others have said), but for batch tagging I think it could be; for
 example the query could be for a tag containing a newline.

 Yes, that's true, this patch series does not support queries with tags
 with embedded newlines. They can still be removed (and added) via either
 batch tagging or the command line. We could just live with this, or

 I think we should just live with it. It's a bunch of code with some UI
 wrinkles for a marginal feature.

Tags with newlines are psychotic.  We should just explicitly forbid them
by preventing them from ever being applied and then never have to worry
about them again.

jamie.


pgpRJzcE8_Trw.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Xapian-quoting based batch-tagging.

2012-12-26 Thread David Bremner
Mark Walters  writes:

> I am unclear about how this is going to deal with queries containing
> newlines. For dump/restore I think this is not a problem (as Austin and
> others have said), but for batch tagging I think it could be; for
> example the query could be for a tag containing a newline.

Yes, that's true, this patch series does not support queries with tags
with embedded newlines. They can still be removed (and added) via either
batch tagging or the command line. We could just live with this, or

- The current syntax allows for detecting options at the start of the
  line; perhaps a future fix would be to have the batch tagging and
  command line tagging accept an optionally hex encoded query, something
  like:

--hex +found%20it -- tag:%22stupid%0Atag%22

- Alternatively, we could add hex decoding on top of xapian quoting for
  queries. One UI downside is that people have to remember that % are
  special.

 +found%25it -- tag:lost%25it

  Another is that quoting is still (surprisingly) necessary for encoded
  spaces

 +found%20it -- tag:"lost%20it"

  Introducing yet another escape format, e.g. "\n" would require more
  code, and not really much benefit afaict versus re-using hex-encoding.
  Offhand I don't see how to avoid this without some level of query
  pre-processing a-la

id:1356313183-9266-1-git-send-email-david at tethera.net

d


Xapian-quoting based batch-tagging.

2012-12-26 Thread Mark Walters

On Tue, 25 Dec 2012, david at tethera.net wrote:
> 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 quoting routine
>  (superceded by one of Austin's patches)
>
>  [Patch v9 05/17] util/string-util: add a new string tokenized function
>  [Patch v9 06/17] unhex_and_quote: new function to quote hex-decoded 
> queries
>  [Patch v9 07/17] notmuch-restore: move query handling for batch  
>  (uneeded if query is passed verbatim to xapian)
>
>  I also removed two tests, since they are about how we handle
>  quoting:
>
>  [Patch v9 13/17] test/tagging: add test for compound queries with batch 
> tagging
>  [Patch v9 17/17] test/tagging: add test for handling of parenthesized
> tag queries.
>
> A few small fixes were needed to the tests, and a fair amount of
> changes to the notmuch-tag man page.

Hi

I am unclear about how this is going to deal with queries containing
newlines. For dump/restore I think this is not a problem (as Austin and
others have said), but for batch tagging I think it could be; for
example the query could be for a tag containing a newline.

Best wishes

Mark


>
> Diffstat (against Austin's series) is as follows
>
>  man/man1/notmuch-tag.1 |   99 -
>  notmuch-tag.c  |  169 
>  tag-util.c |   87 +--
>  tag-util.h |   15 
>  test/tagging   |  195 ++
>  5 files changed, 480 insertions(+), 85 deletions(-)
>
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: Xapian-quoting based batch-tagging.

2012-12-26 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes:

 I am unclear about how this is going to deal with queries containing
 newlines. For dump/restore I think this is not a problem (as Austin and
 others have said), but for batch tagging I think it could be; for
 example the query could be for a tag containing a newline.

Yes, that's true, this patch series does not support queries with tags
with embedded newlines. They can still be removed (and added) via either
batch tagging or the command line. We could just live with this, or

- The current syntax allows for detecting options at the start of the
  line; perhaps a future fix would be to have the batch tagging and
  command line tagging accept an optionally hex encoded query, something
  like:

--hex +found%20it -- tag:%22stupid%0Atag%22

- Alternatively, we could add hex decoding on top of xapian quoting for
  queries. One UI downside is that people have to remember that % are
  special.

 +found%25it -- tag:lost%25it

  Another is that quoting is still (surprisingly) necessary for encoded
  spaces
  
 +found%20it -- tag:lost%20it
 
  Introducing yet another escape format, e.g. \n would require more
  code, and not really much benefit afaict versus re-using hex-encoding.
  Offhand I don't see how to avoid this without some level of query
  pre-processing a-la
  
id:1356313183-9266-1-git-send-email-da...@tethera.net

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Xapian-quoting based batch-tagging.

2012-12-25 Thread da...@tethera.net
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 quoting routine
 (superceded by one of Austin's patches)

 [Patch v9 05/17] util/string-util: add a new string tokenized function
 [Patch v9 06/17] unhex_and_quote: new function to quote hex-decoded queries
 [Patch v9 07/17] notmuch-restore: move query handling for batch
 (uneeded if query is passed verbatim to xapian)

 I also removed two tests, since they are about how we handle
 quoting:

 [Patch v9 13/17] test/tagging: add test for compound queries with batch 
tagging
 [Patch v9 17/17] test/tagging: add test for handling of parenthesized  
tag queries.

A few small fixes were needed to the tests, and a fair amount of
changes to the notmuch-tag man page.

Diffstat (against Austin's series) is as follows

 man/man1/notmuch-tag.1 |   99 -
 notmuch-tag.c  |  169 
 tag-util.c |   87 +--
 tag-util.h |   15 
 test/tagging   |  195 ++
 5 files changed, 480 insertions(+), 85 deletions(-)




Xapian-quoting based batch-tagging.

2012-12-25 Thread david
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 routine
 (superceded by one of Austin's patches)

 [Patch v9 05/17] util/string-util: add a new string tokenized function
 [Patch v9 06/17] unhex_and_quote: new function to quote hex-decoded queries
 [Patch v9 07/17] notmuch-restore: move query handling for batch
 (uneeded if query is passed verbatim to xapian)

 I also removed two tests, since they are about how we handle
 quoting:

 [Patch v9 13/17] test/tagging: add test for compound queries with batch 
tagging
 [Patch v9 17/17] test/tagging: add test for handling of parenthesized  
tag queries.

A few small fixes were needed to the tests, and a fair amount of
changes to the notmuch-tag man page.

Diffstat (against Austin's series) is as follows

 man/man1/notmuch-tag.1 |   99 -
 notmuch-tag.c  |  169 
 tag-util.c |   87 +--
 tag-util.h |   15 
 test/tagging   |  195 ++
 5 files changed, 480 insertions(+), 85 deletions(-)


___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch