From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 694EB40DF1D for ; Sat, 20 Nov 2010 15:38:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7mma4IIfAPjc for ; Sat, 20 Nov 2010 15:38:23 -0800 (PST) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by olra.theworths.org (Postfix) with ESMTP id 19C3140DF18 for ; Sat, 20 Nov 2010 15:38:22 -0800 (PST) Received: by wyb36 with SMTP id 36so1083216wyb.26 for ; Sat, 20 Nov 2010 15:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=RnI+rFQ95lHXmdrYdtGSYLXCyXxQUWYepYMW6w1m4zk=; b=Z+nT1RtdPN4+ixYoZz6/+9dtXbmVwuN0HYEnalh6p8KbZqZ2czB/nfp2QAaXETC0Vt m46qcIGT2xtHyixnXmBAz33uoGEpG+mHCK3ZQ1CdspNoJBrduK4nf4ROAXrfgFwF9Ekv HzGd0YMF/IxwitnZzqwGeSdyZsAXFAUxY4KHw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=TrwuLUJqJS0rygmRF5dzD9Mso1fgf5YIs/Hy328FRS4iwGXJ83e6JBAtzU4voZHS9l XPjau2kRXpOLG7ltIDltmd0IJVfUNNqmplkBZNOsD360D4VOf2zEIwGRblyOco/3afuU o7Qi0uotsbUBbJYljAvrHski812W6JA41froo= MIME-Version: 1.0 Received: by 10.216.11.205 with SMTP id 55mr2420531wex.72.1290296301975; Sat, 20 Nov 2010 15:38:21 -0800 (PST) Received: by 10.216.166.195 with HTTP; Sat, 20 Nov 2010 15:38:21 -0800 (PST) In-Reply-To: <87sjyvk875.fsf@wsheee.2x.cz> References: <87sjyvk875.fsf@wsheee.2x.cz> Date: Sat, 20 Nov 2010 18:38:21 -0500 Message-ID: Subject: Re: [PATCH] Implement a simple read-eval-print loop. From: servilio To: Michal Sojka Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 23:38:35 -0000 Hi Michal, On 20 November 2010 16:15, Michal Sojka 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