[notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread ra...@free.fr
>On Thu, 11 Feb 2010 15:20:54 +0100 (CET), racin at free.fr wrote:
>
>> Using a prefix arg to invert search order would conflict with my patch
>> http://notmuchmail.org/pipermail/notmuch/2009/000914.html in which the
>> prefix arg is used to show deleted messages. I don't known which
>> behaviour for prefix patch would be best.
>
>I always understood a prefix arg to invert the original (or provide a
>numeric repetition), but I do not have a wide sample to tell if this is
>how most elisp implements it. 

Gnus uses a C-u prefix to display old messages, for instance. 

Note that the only advantage of the prefix over the toggle is that it makes one 
call to notmuch search instead of one. I don't think that it matters from a 
performance point of view, as the second search is always much faster than the 
second. Maybe we should just reserve the prefix for a later use.



[notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread ra...@free.fr
Using a prefix arg to invert search order would conflict with my patch 
http://notmuchmail.org/pipermail/notmuch/2009/000914.html
in which the prefix arg is used to show deleted messages. I don't known which 
behaviour for prefix patch would be best.

Though we can also add "toggle keys" that toggle search order, or toggle 
display of deleted messages, which would solve the problem.

Matthieu

- Mail Original -
De: "Sebastian Spaeth" 
?: notmuch at notmuchmail.org
Envoy?: Jeudi 11 F?vrier 2010 14h05:28 GMT +00:00 GMT - Grande-Bretagne, 
Irlande, Portugal
Objet: Re: [notmuch] notmuch.el: Prefix arg inverts the sort order of 
notmuch-search.

On Thu, 11 Feb 2010 14:01:14 +, David Edmondson  wrote:
>   (let ((proc (start-process-shell-command
>"notmuch-search" buffer notmuch-command "search"
>(if oldest-first "--sort=oldest-first" 
> "--sort=newest-first")

Doh, I should shut up when I haven't actually looked at the code. 
The only thing to my defense is that looking at elisp makes me feel
dizzy.

Sorry,
Sebastian
___
notmuch mailing list
notmuch at notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread Sebastian Spaeth
On Thu, 11 Feb 2010 14:01:14 +, David Edmondson  wrote:
>   (let ((proc (start-process-shell-command
>"notmuch-search" buffer notmuch-command "search"
>(if oldest-first "--sort=oldest-first" 
> "--sort=newest-first")

Doh, I should shut up when I haven't actually looked at the code. 
The only thing to my defense is that looking at elisp makes me feel
dizzy.

Sorry,
Sebastian


[notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread Sebastian Spaeth
On Thu, 11 Feb 2010 12:19:12 +, David Edmondson  wrote:
...

I think the correct thing here would be to let notmuch return search is
inverse sort order rather than reverting this later in the client
(unneccessary work). 

 --sort=oldest|newest|relevance 

seems to be what xapian can easily provide us with.


[notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread David Edmondson
On Thu, 11 Feb 2010 14:42:40 +0100, "Sebastian Spaeth"  wrote:
> On Thu, 11 Feb 2010 12:19:12 +, David Edmondson  wrote:
> ...
> 
> I think the correct thing here would be to let notmuch return search is
> inverse sort order rather than reverting this later in the client
> (unneccessary work). 
> 
>  --sort=oldest|newest|relevance 
> 
> seems to be what xapian can easily provide us with.

That's what happens:

(let ((proc (start-process-shell-command
 "notmuch-search" buffer notmuch-command "search"
 (if oldest-first "--sort=oldest-first" 
"--sort=newest-first")
 (shell-quote-argument query

Isn't it?

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


[notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread micah anderson
On Thu, 11 Feb 2010 15:20:54 +0100 (CET), racin at free.fr wrote:

> Using a prefix arg to invert search order would conflict with my patch
> http://notmuchmail.org/pipermail/notmuch/2009/000914.html in which the
> prefix arg is used to show deleted messages. I don't known which
> behaviour for prefix patch would be best.

I always understood a prefix arg to invert the original (or provide a
numeric repetition), but I do not have a wide sample to tell if this is
how most elisp implements it. 

> Though we can also add "toggle keys" that toggle search order, or
> toggle display of deleted messages, which would solve the problem.

There is the 'o' key now which toggles the search order, isn't there? 

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



Re: [notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread Sebastian Spaeth
On Thu, 11 Feb 2010 12:19:12 +, David Edmondson d...@dme.org wrote:
...

I think the correct thing here would be to let notmuch return search is
inverse sort order rather than reverting this later in the client
(unneccessary work). 

 --sort=oldest|newest|relevance 

seems to be what xapian can easily provide us with.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread Sebastian Spaeth
On Thu, 11 Feb 2010 14:01:14 +, David Edmondson d...@dme.org wrote:
   (let ((proc (start-process-shell-command
notmuch-search buffer notmuch-command search
(if oldest-first --sort=oldest-first 
 --sort=newest-first)

Doh, I should shut up when I haven't actually looked at the code. 
The only thing to my defense is that looking at elisp makes me feel
dizzy.

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


Re: [notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread racin
Using a prefix arg to invert search order would conflict with my patch 
http://notmuchmail.org/pipermail/notmuch/2009/000914.html
in which the prefix arg is used to show deleted messages. I don't known which 
behaviour for prefix patch would be best.

Though we can also add toggle keys that toggle search order, or toggle 
display of deleted messages, which would solve the problem.

Matthieu

- Mail Original -
De: Sebastian Spaeth sebast...@sspaeth.de
À: notmuch@notmuchmail.org
Envoyé: Jeudi 11 Février 2010 14h05:28 GMT +00:00 GMT - Grande-Bretagne, 
Irlande, Portugal
Objet: Re: [notmuch] notmuch.el: Prefix arg inverts the sort order of 
notmuch-search.

On Thu, 11 Feb 2010 14:01:14 +, David Edmondson d...@dme.org wrote:
   (let ((proc (start-process-shell-command
notmuch-search buffer notmuch-command search
(if oldest-first --sort=oldest-first 
 --sort=newest-first)

Doh, I should shut up when I haven't actually looked at the code. 
The only thing to my defense is that looking at elisp makes me feel
dizzy.

Sorry,
Sebastian
___
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: [notmuch] notmuch.el: Prefix arg inverts the sort order of notmuch-search.

2010-02-11 Thread micah anderson
On Thu, 11 Feb 2010 15:20:54 +0100 (CET), ra...@free.fr wrote:

 Using a prefix arg to invert search order would conflict with my patch
 http://notmuchmail.org/pipermail/notmuch/2009/000914.html in which the
 prefix arg is used to show deleted messages. I don't known which
 behaviour for prefix patch would be best.

I always understood a prefix arg to invert the original (or provide a
numeric repetition), but I do not have a wide sample to tell if this is
how most elisp implements it. 

 Though we can also add toggle keys that toggle search order, or
 toggle display of deleted messages, which would solve the problem.

There is the 'o' key now which toggles the search order, isn't there? 

m


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