[PATCH] Customize saved search order separately from regular search order

2010-06-07 Thread David Edmondson
On Mon, 07 Jun 2010 14:49:23 +0100, David Edmondson  wrote:
> Writing code to manipulate and use a structure like this would obviously
> be some effort, but it doesn't seem overly difficult. More challenging
> would be the interface to allow the user to customise the structure to
> express their intentions. Do you have any thoughts on that?

Moreover, what happens if the user types in a search by hand and then
wishes to make it a saved search? Determining the best/right way to
insert it into the considerably more complex `notmuch-saved-searches'
structure sounds hard.

If this data structure were only ever manipulated by editing .emacs then
I'd have no problem. Currently that's not the case.

dme.
-- 
David Edmondson, http://dme.org
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH] Customize saved search order separately from regular search order

2010-06-07 Thread David Edmondson
On Thu, 03 Jun 2010 17:45:20 -0700, Carl Worth  wrote:
> So I think what we actually want here is an additional member for our
> saved-search tuple which indicates the desired search order for that
> particular search. That's the only way I see to support a single user
> who wants to take advantage of both kinds of searches.

That seems straightforward to implement in the code and only slightly
complicated in the customisation interface (though I haven't done it
yet).

> A separated, but perhaps related idea would be to explicitly support the
> notion of one search being a subset of another. I have an "inbox" search
> (tag:inbox) and several searches that are subsets, ("notmuch" is
> "tag:notmuch and tag:inbox"). If this were setup as an actual hierarchy
> it might have two advantages:
> 
>   1. It would be a bit simpler to specify all of theses searches,
>  I wouldn't have to keep repeating "and tag:inbox" in each.
>  This would be particularly important if I changed the
>  criteria for the top-level search.
> 
>   2. If the various levels of the hierarchy were displayed
>  separately it would be easier for me to focus on processing
>  all of my inbox folders (which happen to be
>  oldest-first)--archiving each down to 0 messages, without
>  being distracted by several (newest-first) saved searches
>  that will only ever grow and don't have any
>  processing/archiving associated with them.

Writing code to manipulate and use a structure like this would obviously
be some effort, but it doesn't seem overly difficult. More challenging
would be the interface to allow the user to customise the structure to
express their intentions. Do you have any thoughts on that?

dme.
-- 
David Edmondson, http://dme.org
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: [PATCH] Customize saved search order separately from regular search order

2010-06-07 Thread David Edmondson
On Thu, 03 Jun 2010 17:45:20 -0700, Carl Worth cwo...@cworth.org wrote:
 So I think what we actually want here is an additional member for our
 saved-search tuple which indicates the desired search order for that
 particular search. That's the only way I see to support a single user
 who wants to take advantage of both kinds of searches.

That seems straightforward to implement in the code and only slightly
complicated in the customisation interface (though I haven't done it
yet).

 A separated, but perhaps related idea would be to explicitly support the
 notion of one search being a subset of another. I have an inbox search
 (tag:inbox) and several searches that are subsets, (notmuch is
 tag:notmuch and tag:inbox). If this were setup as an actual hierarchy
 it might have two advantages:
 
   1. It would be a bit simpler to specify all of theses searches,
  I wouldn't have to keep repeating and tag:inbox in each.
  This would be particularly important if I changed the
  criteria for the top-level search.
 
   2. If the various levels of the hierarchy were displayed
  separately it would be easier for me to focus on processing
  all of my inbox folders (which happen to be
  oldest-first)--archiving each down to 0 messages, without
  being distracted by several (newest-first) saved searches
  that will only ever grow and don't have any
  processing/archiving associated with them.

Writing code to manipulate and use a structure like this would obviously
be some effort, but it doesn't seem overly difficult. More challenging
would be the interface to allow the user to customise the structure to
express their intentions. Do you have any thoughts on that?

dme.
-- 
David Edmondson, http://dme.org


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


Re: [PATCH] Customize saved search order separately from regular search order

2010-06-07 Thread David Edmondson
On Mon, 07 Jun 2010 14:49:23 +0100, David Edmondson d...@dme.org wrote:
 Writing code to manipulate and use a structure like this would obviously
 be some effort, but it doesn't seem overly difficult. More challenging
 would be the interface to allow the user to customise the structure to
 express their intentions. Do you have any thoughts on that?

Moreover, what happens if the user types in a search by hand and then
wishes to make it a saved search? Determining the best/right way to
insert it into the considerably more complex `notmuch-saved-searches'
structure sounds hard.

If this data structure were only ever manipulated by editing .emacs then
I'd have no problem. Currently that's not the case.

dme.
-- 
David Edmondson, http://dme.org


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


[PATCH] Customize saved search order separately from regular search order

2010-06-04 Thread Michal Sojka
On Fri, 04 Jun 2010, Carl Worth wrote:
> Keith happens to use saved searches only for subsets of his inbox and in
> that case, it makes a lot of sense to see the results of all of these
> messages in an oldest-first order.

Hi,

I used saved searches mostly this way until a few days ago, when I wrote
"What's in your inbox" patch (I'll send it as a reply to this mail). I
have to say I'm quite satisfied with it.

-Michal


Re: [PATCH] Customize saved search order separately from regular search order

2010-06-04 Thread Michal Sojka
On Fri, 04 Jun 2010, Carl Worth wrote:
 Keith happens to use saved searches only for subsets of his inbox and in
 that case, it makes a lot of sense to see the results of all of these
 messages in an oldest-first order.

Hi,

I used saved searches mostly this way until a few days ago, when I wrote
What's in your inbox patch (I'll send it as a reply to this mail). I
have to say I'm quite satisfied with it.

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


[PATCH] Customize saved search order separately from regular search order

2010-06-03 Thread Carl Worth
On Tue, 04 May 2010 12:02:22 +0100, David Edmondson  wrote:
> On Mon,  3 May 2010 13:58:27 -0700, Keith Packard  
> wrote:
> > I use 'saved searches' as a folder mechanism and want them to be shown
> > oldest first. Otherwise, while searching for messages normally, I want
> > to see the most recent messages first. This patch makes these two
> > default search orders separate.
> 
> This is a nice patch.

I think this is a nice start, but that we actually want a different
notion here.

Keith happens to use saved searches only for subsets of his inbox and in
that case, it makes a lot of sense to see the results of all of these
messages in an oldest-first order.

But saved searches are also useful for simply capturing what might be an
often-used but otherwise painful-to-keep-retyping search expression
where the user really wants the results to appear with the newest
message first, (which is the default search-results order after all).

So I think what we actually want here is an additional member for our
saved-search tuple which indicates the desired search order for that
particular search. That's the only way I see to support a single user
who wants to take advantage of both kinds of searches.

Thoughts?

A separated, but perhaps related idea would be to explicitly support the
notion of one search being a subset of another. I have an "inbox" search
(tag:inbox) and several searches that are subsets, ("notmuch" is
"tag:notmuch and tag:inbox"). If this were setup as an actual hierarchy
it might have two advantages:

1. It would be a bit simpler to specify all of theses searches,
   I wouldn't have to keep repeating "and tag:inbox" in each.
   This would be particularly important if I changed the
   criteria for the top-level search.

2. If the various levels of the hierarchy were displayed
   separately it would be easier for me to focus on processing
   all of my inbox folders (which happen to be
   oldest-first)--archiving each down to 0 messages, without
   being distracted by several (newest-first) saved searches
   that will only ever grow and don't have any
   processing/archiving associated with them.

I think that currently I'm not using any of these
always-growing/newest-first searches in part because they would be mixed
up with my inbox-subset folders and would thereby be distracting. So (2)
above would allow me to start using them, and then I would want the
feature to selectively set the search order.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [PATCH] Customize saved search order separately from regular search order

2010-06-03 Thread Carl Worth
On Tue, 04 May 2010 12:02:22 +0100, David Edmondson d...@dme.org wrote:
 On Mon,  3 May 2010 13:58:27 -0700, Keith Packard kei...@keithp.com wrote:
  I use 'saved searches' as a folder mechanism and want them to be shown
  oldest first. Otherwise, while searching for messages normally, I want
  to see the most recent messages first. This patch makes these two
  default search orders separate.
 
 This is a nice patch.

I think this is a nice start, but that we actually want a different
notion here.

Keith happens to use saved searches only for subsets of his inbox and in
that case, it makes a lot of sense to see the results of all of these
messages in an oldest-first order.

But saved searches are also useful for simply capturing what might be an
often-used but otherwise painful-to-keep-retyping search expression
where the user really wants the results to appear with the newest
message first, (which is the default search-results order after all).

So I think what we actually want here is an additional member for our
saved-search tuple which indicates the desired search order for that
particular search. That's the only way I see to support a single user
who wants to take advantage of both kinds of searches.

Thoughts?

A separated, but perhaps related idea would be to explicitly support the
notion of one search being a subset of another. I have an inbox search
(tag:inbox) and several searches that are subsets, (notmuch is
tag:notmuch and tag:inbox). If this were setup as an actual hierarchy
it might have two advantages:

1. It would be a bit simpler to specify all of theses searches,
   I wouldn't have to keep repeating and tag:inbox in each.
   This would be particularly important if I changed the
   criteria for the top-level search.

2. If the various levels of the hierarchy were displayed
   separately it would be easier for me to focus on processing
   all of my inbox folders (which happen to be
   oldest-first)--archiving each down to 0 messages, without
   being distracted by several (newest-first) saved searches
   that will only ever grow and don't have any
   processing/archiving associated with them.

I think that currently I'm not using any of these
always-growing/newest-first searches in part because they would be mixed
up with my inbox-subset folders and would thereby be distracting. So (2)
above would allow me to start using them, and then I would want the
feature to selectively set the search order.

-Carl

-- 
carl.d.wo...@intel.com


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


[PATCH] Customize saved search order separately from regular search order

2010-05-04 Thread David Edmondson
On Mon,  3 May 2010 13:58:27 -0700, Keith Packard  wrote:
> I use 'saved searches' as a folder mechanism and want them to be shown
> oldest first. Otherwise, while searching for messages normally, I want
> to see the most recent messages first. This patch makes these two
> default search orders separate.

This is a nice patch.

dme.
-- 
David Edmondson, http://dme.org
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH] Customize saved search order separately from regular search order

2010-05-03 Thread Keith Packard
I use 'saved searches' as a folder mechanism and want them to be shown
oldest first. Otherwise, while searching for messages normally, I want
to see the most recent messages first. This patch makes these two
default search orders separate.

Signed-off-by: Keith Packard 
---
 emacs/notmuch-hello.el |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 6a1c56e..f44b1d3 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -37,6 +37,11 @@
   :type 'integer
   :group 'notmuch)

+(defcustom notmuch-saved-search-oldest-first t
+  "Whether saved searches should be oldest first."
+  :type 'boolean
+  :group 'notmuch)
+
 (defcustom notmuch-show-empty-saved-searches nil
   "Should saved searches with no messages be listed?"
   :type 'boolean
@@ -140,7 +145,7 @@ diagonal."
 (defun notmuch-hello-widget-search (widget  ignore)
   (notmuch-search (widget-get widget
  :notmuch-search-terms)
- notmuch-search-oldest-first
+ notmuch-saved-search-oldest-first
  nil nil #'notmuch-hello-search-continuation))

 (defun notmuch-saved-search-count (search)
-- 
1.7.0.4



[PATCH] Customize saved search order separately from regular search order

2010-05-03 Thread Keith Packard
I use 'saved searches' as a folder mechanism and want them to be shown
oldest first. Otherwise, while searching for messages normally, I want
to see the most recent messages first. This patch makes these two
default search orders separate.

Signed-off-by: Keith Packard kei...@keithp.com
---
 emacs/notmuch-hello.el |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 6a1c56e..f44b1d3 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -37,6 +37,11 @@
   :type 'integer
   :group 'notmuch)
 
+(defcustom notmuch-saved-search-oldest-first t
+  Whether saved searches should be oldest first.
+  :type 'boolean
+  :group 'notmuch)
+
 (defcustom notmuch-show-empty-saved-searches nil
   Should saved searches with no messages be listed?
   :type 'boolean
@@ -140,7 +145,7 @@ diagonal.
 (defun notmuch-hello-widget-search (widget rest ignore)
   (notmuch-search (widget-get widget
  :notmuch-search-terms)
- notmuch-search-oldest-first
+ notmuch-saved-search-oldest-first
  nil nil #'notmuch-hello-search-continuation))
 
 (defun notmuch-saved-search-count (search)
-- 
1.7.0.4

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