From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3CE1C6DE0318 for ; Thu, 27 Oct 2016 10:25:54 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.127 X-Spam-Level: X-Spam-Status: No, score=-0.127 tagged_above=-999 required=5 tests=[AWL=-0.257, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1fc4yIGrlR2k for ; Thu, 27 Oct 2016 10:25:53 -0700 (PDT) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by arlo.cworth.org (Postfix) with ESMTPS id 841686DE0159 for ; Thu, 27 Oct 2016 10:25:52 -0700 (PDT) Received: by mail-lf0-f42.google.com with SMTP id b81so37764784lfe.1 for ; Thu, 27 Oct 2016 10:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:user-agent:date:message-id:mime-version; bh=ag65vYOhDLGayKfts+2HGcdUwyLGx3lIFd0MuQdEBA8=; b=sbwpwC48vHq0xOUPzusRMdPIzTskssHrAJEJQjgUgSAwNzyjbQ8fj4Dd7XORVbPB// jJZjt3eCem3vQrCRaaK9xgwwZObQVv+V5HFNQWiKY4+wiisVD9KcDQ1xW5pSWhxpR6yf MW4KkJKZylP6+3Ai5qXMu+WVkdhiB+T9CK+t+aysDZX15nNHRv85m/4/xqMe8/tboOqS X0TqaTPjYj8lbY5rRN3qA/+EOF/MCz6Axk53ML9dp9Vy8Kyc+d5LVSUhzZdo+fLBXmgj 3Q0pOQ1AwOmq6rWG8S7MVkl8nPX2TO92Xys+MJ9g49q6Y8JOHxtH1daSnMpcujmbFLqT hbVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:user-agent:date:message-id :mime-version; bh=ag65vYOhDLGayKfts+2HGcdUwyLGx3lIFd0MuQdEBA8=; b=i5CJp5zbSXYuOi2AoJLrfg8JrIdN6qAYFg8jmwU8tg28GY1gC45CBGNdlelTczpcAF OtnEbzrp5th2+ae27H4gIjYesPzipFDInVfBvk1dxEylvFdmoANc7Of3jIq0MzKfeXmn MZjzjYU6SlckpsvPdtKCmLhOGf4z2e8hnX5X+dm/fgKQev1ZQDRHkYKBqOAyo/6Srwks iVyM7DRQRs0N6CW17pu5P6VC6bDyiCULPPz6DhYiTwJ0+a0/N04AZjUKSaVsnVEZ9Y+8 GxA73oYnKDTHNFNyfNPqfrWVjRaFYZ7FytwoTV29lt55GR6oinvocT1i1oHO6ya7sGfE 2wHA== X-Gm-Message-State: ABUngvdIWam9xECts+dgUjYJMzU/s18QOoTpZXYKpwxJDCJQWvsK9+qR43FrKa1acQy+eA== X-Received: by 10.25.32.67 with SMTP id g64mr6267690lfg.180.1477589149044; Thu, 27 Oct 2016 10:25:49 -0700 (PDT) Received: from localhost.localdomain (dys5r8yycf7d---w7t57y-3.rev.dnainternet.fi. [2001:14ba:3f2:ee00:226:c7ff:fe5b:8676]) by smtp.gmail.com with ESMTPSA id x23sm1412123lfa.4.2016.10.27.10.25.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Oct 2016 10:25:48 -0700 (PDT) From: Tomi Ollila X-Google-Original-From: Tomi Ollila To: notmuch@notmuchmail.org Subject: rfc for notmuch remote access script User-Agent: Notmuch/0.21+14~g053baf4 (http://notmuchmail.org) Emacs/25.1.1 (x86_64-redhat-linux-gnu) Date: Thu, 27 Oct 2016 20:25:41 +0300 Message-ID: <87lgx9ln56.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Thu, 27 Oct 2016 17:25:54 -0000 Hi j4ni on irc expressed interest of having an installation option for notmuch-emacs and a notmuch remote access script as 'notmuch' This got me thinking what kind of script would fulfill all the needs that I know of. and this is the result of that: --8<----8<----8<----8<----8<----8<----8<----8<-- #!/bin/bash set -euf if [ "${NOTMUCH_REMOTE_XTRACE_FILE-}" ]; then exec 6>>"$NOTMUCH_REMOTE_XTRACE_FILE" BASH_XTRACEFD=6 echo -- >&6 set -x env >&6 fi : ${NOTMUCH_REMOTE_SSH_COMMAND:=ssh} : ${NOTMUCH_REMOTE_SSH_ARGS=} : ${NOTMUCH_REMOTE_HOST:=notmuch} : ${NOTMUCH_REMOTE_COMMAND:=notmuch} printf -v ARGS '%q ' "$@" exec "$NOTMUCH_REMOTE_SSH_COMMAND" $NOTMUCH_REMOTE_SSH_ARGS \ "$NOTMUCH_REMOTE_HOST" $NOTMUCH_REMOTE_COMMAND $ARGS --8<----8<----8<----8<----8<----8<----8<----8<-- out of the box this works like the instructions given in https://notmuchmail.org/remoteusage/ (with ~/.ssh/config changes) and https://notmuchmail.org/remoteusage/124/ (with suitable wrapping so that contents of ~/.ssh/ can be left unmodified) also, debugging is easy. (setenv "NOTMUCH_REMOTE_XTRACE_FILE" "xtrace.log") inside emacs, and NOTMUCH_REMOTE_XTRACE_FILE=xtrace.log notmuch-remote on the command line. what do you think? Tomi