Subject: Re: [sup-devel] now in next: sup-cmd

From: Carl Worth <[email-masked]>
Date: Tue, 09 Mar 2010 16:08:11 -0800

In a recent thread on the sup mailing list there was discussion of the
similarities of the recently-added sup-cmd command-line interface with
that of notmuch. And there was at least one proposal for adding some
syntax to notmuch:

On Fri, 05 Mar 2010 00:40:27 -0800 (PST), Nicolas Pouillard <[email-masked]> wrote:
> Yes please add the is: prefix too, tag: was added to sup.

I've just added this to notmuch. So you can now search for "is:unread"
as a synonym for "tag:unread".

Have fun,

-Carl
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Nicolas Pouillard <[email-masked]>
Date: Thu, 04 Mar 2010 05:10:39 -0800 (PST)

On Thu, 04 Mar 2010 02:48:16 -0500, Rich Lane <[email-masked]> wrote:
> I already had the code for a sup-server sup-cmd sitting around, so I
> wrote a small compatibility layer that lets it run using the mainline
> index API. It outputs YAML.
> 
> Usage:
> sup-cmd count 'is:inbox'
> sup-cmd query --offset 10 --limit 5 'is:unread'
> sup-cmd label --add-labels 'bugs' --remove-labels 'inbox' 'is:inbox AND from:bugzilla'
> sup-cmd add --labels 'sent' < email

This is great!

BTW is there any hope to reach a kind of concensus of a nice CLI API with
notmuch people?

-- 
Nicolas Pouillard
http://nicolaspouillard.fr
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Carl Worth <[email-masked]>
Date: Thu, 04 Mar 2010 10:25:06 -0800

> BTW is there any hope to reach a kind of concensus of a nice CLI API with

It seems to me, at least, like that would be a worthwhile effort.

I still consider the notmuch UI young enough that it's still quite
flexible. And I'm here on the sup list if we want to talk here.

For reference, the rough equivalent of the above commands in notmuch
would be (with footnotes where things don't match exactly):

	notmuch count 'tag:inbox'
	notmuch search 'tag:unread' [*]
        notmuch tag +bugs -inbox 'tag:inbox AND from:bugzilla'
        notmuch new [**]

So, I obviously switched from "label" to "tag" when I moved from sup to
notmuch. But I do like the "is:" prefix---I can easily see adding that
at least.

-Carl

[*] Notmuch currently doesn't have an equivalent of --offset and --limit
but did have --first and --max-threads for a while, (and we'll probably
be adding the same feature back again). The names of "offset" and "limit"
sound good to me.

[**] "notmuch new" is certainly only a very poor approximation of
"sup-cmd add". The notmuch cli does not currently have any way to add an
explicit file, (instead, "notmuch new" simply finds all new, renamed,
and deleted files within the mail store). By the way, what's the
semantic for "sup-cmd add" when it accepts a message on stdin? How is
the message content every returned later?
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Rich Lane <[email-masked]>
Date: Thu, 04 Mar 2010 02:48:16 -0500

Usage:
sup-cmd count 'is:inbox'

---

From: Nicolas Pouillard <[email-masked]>
Date: Fri, 05 Mar 2010 00:40:27 -0800 (PST)

>         notmuch tag +bugs -inbox 'tag:inbox AND from:bugzilla'

About the sup-cmd label vs notmuch tag commands, I prefer the notmuch syntax.
Moreover an alias could be added to both to unify between label and tag.

Regards,