Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] Added --search option to sup
@ 2007-10-16 11:03 Marcus Williams
  2007-11-02 19:07 ` William Morgan
       [not found] ` <<35a8c9eb0016c658@IMSS-WIN>
  0 siblings, 2 replies; 6+ messages in thread
From: Marcus Williams @ 2007-10-16 11:03 UTC (permalink / raw)


Hi -

Attached is a simple patch to sup to add a command line option to jump
straight into a search from the command line. This doesnt do the feature
request of mine from yesterday as I'm implementing that in a sup-cli
script separately. I thought it was useful enough though - apols for any
ruby nooby code ;)

So you can do something like:

sup --search "from:sup-talk* subject:PATCH"

Marcus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sup.diff
Url: http://rubyforge.org/pipermail/sup-talk/attachments/20071016/d583276d/attachment.pl 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH] Added --search option to sup
  2007-10-16 11:03 [sup-talk] [PATCH] Added --search option to sup Marcus Williams
@ 2007-11-02 19:07 ` William Morgan
       [not found] ` <<35a8c9eb0016c658@IMSS-WIN>
  1 sibling, 0 replies; 6+ messages in thread
From: William Morgan @ 2007-11-02 19:07 UTC (permalink / raw)


Excerpts from Marcus Williams's message of Tue Oct 16 04:03:52 -0700 2007:
> Attached is a simple patch to sup to add a command line option to jump
> straight into a search from the command line.

Interesting idea! What's your usage case: that you do the search, maybe
read some resulting messages, and then quit Sup? Or do you continue to
use Sup as normal? I.e. should we bother to even load the inbox?

-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH] Added --search option to sup
       [not found] ` <<35a8c9eb0016c658@IMSS-WIN>
@ 2007-11-03 20:20   ` Marcus Williams
  2007-11-03 21:17     ` William Morgan
  0 siblings, 1 reply; 6+ messages in thread
From: Marcus Williams @ 2007-11-03 20:20 UTC (permalink / raw)


[resubscribing under a different address, not sure if this will thread
properly]

On 2.11.2007, William Morgan wrote:
> Interesting idea! What's your usage case: that you do the search, maybe
> read some resulting messages, and then quit Sup? Or do you continue to
> use Sup as normal? I.e. should we bother to even load the inbox?

I use my email for all sorts, but one thing I do often is use it as a
todo list. So I have a set of current todos (labeled todo). Its good
to be able to bring up sup, with the todos only. Sometimes I'll stay
in sup, sometimes not. 

Anyone who is into gtd could use this for contexts, my "todo" label
is like a context. I can enter sup and deal with this and not get 
distracted by other stuff.

It also means I can alias "todo" in my shell to "sup --search
'label:todo'" or something.

In some cases I dont need the inbox at all like you say. I tried to 
add a --no-inbox flag to sup, but I couldnt get it to work. I think
the buffer sizes screwed up somehow when I stopped the inbox mode from
spawning. I must have missed something.

I spotted that the inbox is actually a search result whilst trawling
the code so my idea is now that instead of a --no-inbox what you
actually do is have another search argument --inbox that takes a
search term This would set the search term for the inbox mode. That
way you could go into sup and have your inbox mode permanently in
whatever search term you entered.

This would mean you could go in via --search and keep your inbox as
normal. Or via --inbox and have a specialised inbox. 

Marcus


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH] Added --search option to sup
  2007-11-03 20:20   ` Marcus Williams
@ 2007-11-03 21:17     ` William Morgan
  2007-11-03 21:35       ` Marcus Williams
  0 siblings, 1 reply; 6+ messages in thread
From: William Morgan @ 2007-11-03 21:17 UTC (permalink / raw)


Excerpts from Marcus Williams's message of Sat Nov 03 13:20:48 -0700 2007:
> I use my email for all sorts, but one thing I do often is use it as a
> todo list. So I have a set of current todos (labeled todo). Its good
> to be able to bring up sup, with the todos only. Sometimes I'll stay
> in sup, sometimes not. 

Very nice. One of the items on the TODO for quite a while has been to
add "notes" as a first-class object, which will be treated more or less
as draft emails are now, except they'll have no from/to/cc/etc, only a
body, and obviously can't be sent, just created, edited, and deleted.

These can be used as general notes, as todo items, and can be "attached"
to emails or other notes via the threading system. And of course the
full-text search and labeling can be used as normal.

Then all I have to do is add a web browser mode and a partial
implementation of lisp and sup will be feature complete!

> I spotted that the inbox is actually a search result whilst trawling
> the code so my idea is now that instead of a --no-inbox what you
> actually do is have another search argument --inbox that takes a
> search term This would set the search term for the inbox mode. That
> way you could go into sup and have your inbox mode permanently in
> whatever search term you entered.

The problem is that inbox-mode per se has some special functionality
that doesn't quite make sense unless it's applied to the search with
"label:inbox". We could force that to be prepended to any search phrase
passed in from the command line, I suppose.

For the time being, I'll apply the patch as is.

-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH] Added --search option to sup
  2007-11-03 21:17     ` William Morgan
@ 2007-11-03 21:35       ` Marcus Williams
  2007-11-03 22:12         ` William Morgan
  0 siblings, 1 reply; 6+ messages in thread
From: Marcus Williams @ 2007-11-03 21:35 UTC (permalink / raw)


On 3.11.2007, William Morgan wrote:
> Very nice. One of the items on the TODO for quite a while has been to
> add "notes" as a first-class object, which will be treated more or less
> as draft emails are now, except they'll have no from/to/cc/etc, only a
> body, and obviously can't be sent, just created, edited, and deleted.

Yeah, I noticed that on the todo list. That would be very nice -
something that has always bothered me about email is that I cant just
add notes to them (in most clients). And not having to actually send
myself a message to "add" a note would be less work! 

> Then all I have to do is add a web browser mode and a partial
> implementation of lisp and sup will be feature complete!

I've been trying to figure out if a web browser mode would be possible
in the current mode system. I couldnt figure out if the mode stuff was
reliant on ncurses or just happened to be modes that used ncurses.

> The problem is that inbox-mode per se has some special functionality
> that doesn't quite make sense unless it's applied to the search with
> "label:inbox". We could force that to be prepended to any search phrase
> passed in from the command line, I suppose.

To be honest I probably wouldnt use the --inbox flag that often, it
just struck me as nicer way to implement no having an inbox. I use the
search flag quite a lot though so good to see it got in :)

Marcus


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [sup-talk] [PATCH] Added --search option to sup
  2007-11-03 21:35       ` Marcus Williams
@ 2007-11-03 22:12         ` William Morgan
  0 siblings, 0 replies; 6+ messages in thread
From: William Morgan @ 2007-11-03 22:12 UTC (permalink / raw)


Excerpts from Marcus Williams's message of Sat Nov 03 14:35:55 -0700 2007:
> I've been trying to figure out if a web browser mode would be possible
> in the current mode system. I couldnt figure out if the mode stuff was
> reliant on ncurses or just happened to be modes that used ncurses.

That was actually a sick joke about writing my own ncurses-based browser
from within Sup. But to answer what I think was a serious question about
a web version of sup itself, a couple people have expressed a desire to
write this, which I think is a little ironic, but which I'm certainly
not opposed to.

The mode system (in contrast with the buffer system) is not *explicitly*
tied to ncurses but probably has all sorts of implicit ties. I.e. it
might be possible to come up with some explicit mapping of modes to web
pages and commands to web form buttons, but my personal suspicion is
that the paradigms are so radically different that that level of
integration will be impossible.

But certainly searching the index and pulling up threads, messages, etc
all is done through nice programmatic interfaces, and I've started
documenting this on the wiki, mostly from that email I sent you about
sup-cli.

> To be honest I probably wouldnt use the --inbox flag that often, it
> just struck me as nicer way to implement no having an inbox. I use the
> search flag quite a lot though so good to see it got in :)

Just added --search to SVN. Thanks!

-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-03 22:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-16 11:03 [sup-talk] [PATCH] Added --search option to sup Marcus Williams
2007-11-02 19:07 ` William Morgan
     [not found] ` <<35a8c9eb0016c658@IMSS-WIN>
2007-11-03 20:20   ` Marcus Williams
2007-11-03 21:17     ` William Morgan
2007-11-03 21:35       ` Marcus Williams
2007-11-03 22:12         ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox