[PATCH] Implement a simple read-eval-print loop.

Austin Clements amdragon at gmail.com
Sun Nov 21 09:35:47 PST 2010


Out of curiosity, why not simply use SSH control mastering?  You could even
make that part of the "standard" remote notmuch script, without requiring
the user to change anything in their ssh configuration.  This should be just
as fast as a remote notmuch shell, but retains the ability to run multiple
simultaneous operations and leverages all of the fancy session machinery
already built in to ssh.  It seems to me that ssh already does what you
want, and I'm curious what the advantage is to reinventing the wheel.

On Sat, Nov 20, 2010 at 6:38 PM, servilio <servilio at gmail.com> wrote:

> Hi Michal,
>
> On 20 November 2010 16:15, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> > On Sat, 20 Nov 2010, servilio wrote:
> >> This implementation uses GNU readline for the prompt and command
> >> history, with the default file completion enabled. GLib is used to
> >> split the read line into an arguments list.
> >
> > Hi,
> >
> > I haven't tested it yet, but it seems to be exactly the piece of code I
> > wanted to have to speed up notmuch-hello when notmuch is used remotely
> > over ssh. Spawning new ssh for every saved search to get the count of
> > matched messages has a way too big overhead. Is this the use case you
> > had in mind when implementing this?
>
> Great to see that you find it useful. Yes, the remote usage was in my
> mind, but it should enhance the local usage as well. We could also
> create a quicker test run using the shell.
>
> The disadvantage of using an interactive shell is that you can have
> only one operation running in the UI, and I see no way of
> interrumpting an operation unless you kill the process, but as
> starting a new shell shouldn't be a biggie, this might not be as
> limiting as might seem.
>
> The ideal would be for libnotmuch to be able to connect to a
> xapian-tcpsrv, but haven't had time to look at than, and an
> interactive shell seemed to be less time demanding to implement (and
> had the subjective promise of providing a lot of fun).
>
> > Currently, I have only one comment to the patch. For me, "repl" is a bit
> > unintuitive. I was thinking about "shell" as the name of subcommand for
> > this.
>
> I agree, maybe "shell" or "interactive" would be more intuitive, but
> when I started "repl" was the only one I could think of.
>
> Servilio
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20101121/009f39f8/attachment.html>


More information about the notmuch mailing list