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 6927C40DF1C for ; Sun, 21 Nov 2010 14:15:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.2 X-Spam-Level: X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 jtb7V5Pk1Swn for ; Sun, 21 Nov 2010 14:14:57 -0800 (PST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by olra.theworths.org (Postfix) with ESMTP id 0F8C040DEF1 for ; Sun, 21 Nov 2010 14:14:57 -0800 (PST) Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1PKIBS-0003Pa-GN; Sun, 21 Nov 2010 22:14:54 +0000 Received: from 158.96.124.202.static.snap.net.nz ([202.124.96.158] helo=grond) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PKIBR-0002g5-Nm; Sun, 21 Nov 2010 22:14:54 +0000 Received: by grond (Postfix, from userid 1000) id D971920E15B; Mon, 22 Nov 2010 11:14:48 +1300 (NZDT) From: Michael Hudson To: Michal Sojka , Austin Clements , servilio Subject: Re: [PATCH] Implement a simple read-eval-print loop. In-Reply-To: <87vd3qbb1a.fsf@resox.2x.cz> References: <87sjyvk875.fsf@wsheee.2x.cz> <87y68mbcye.fsf@resox.2x.cz> <87vd3qbb1a.fsf@resox.2x.cz> User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Date: Mon, 22 Nov 2010 11:14:48 +1300 Message-ID: <87fwuuuxwn.fsf@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Sun, 21 Nov 2010 22:15:08 -0000 On Sun, 21 Nov 2010 22:51:29 +0100, Michal Sojka wrote: > On Sun, 21 Nov 2010, Michal Sojka wrote: > > This is a great idea. Now I use this script to invoke notmuch remotely > > and I don't have to create master connection manually. > > > > #!/bin/bash > > socket="$HOME/.ssh/notmuch-connection" > > if [[ ! -S $socket ]]; then > > # Create master connection in background (the connection is closed > > # after 10 minutes) > > ssh -f -M -S $socket example.org sleep 600 > > The above line must be changed to > ssh -f -M -S $socket example.org sleep 600 >/dev/null 2>&1 > Without the redirections emacs blocks until the command closes stdout, > which takes 10 minutes in this case. You can also use ssh -N, although that doesn't disconnect after 10 minutes. 'autossh' can also be handy in this sort of situation. Cheers, mwh > > fi > > printf -v args "%q " "$@" > > ssh -S $socket example.org notmuch $args > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch