Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A0DBC40DF1E for ; Sun, 21 Nov 2010 13:52:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 AR6CRV2H2D+Y for ; Sun, 21 Nov 2010 13:51:50 -0800 (PST) Received: from smtp.nextra.cz (smtp.nextra.cz [212.65.193.3]) by olra.theworths.org (Postfix) with ESMTP id 91D5240DF18 for ; Sun, 21 Nov 2010 13:51:50 -0800 (PST) Received: from resox.2x.cz (unknown [213.29.198.144]) by smtp.nextra.cz (Postfix) with ESMTP id 786179B7BF; Sun, 21 Nov 2010 22:51:49 +0100 (CET) Received: from wsh by resox.2x.cz with local (Exim 4.72) (envelope-from ) id 1PKHox-0005y0-6f; Sun, 21 Nov 2010 22:51:39 +0100 From: Michal Sojka To: Austin Clements , servilio Subject: Re: [PATCH] Implement a simple read-eval-print loop. In-Reply-To: <87y68mbcye.fsf@resox.2x.cz> References: <87sjyvk875.fsf@wsheee.2x.cz> <87y68mbcye.fsf@resox.2x.cz> User-Agent: Notmuch/0.5-11-g48b5e00 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Sun, 21 Nov 2010 22:51:29 +0100 Message-ID: <87vd3qbb1a.fsf@resox.2x.cz> 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 21:52:00 -0000 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. > fi > printf -v args "%q " "$@" > ssh -S $socket example.org notmuch $args