From: Keegan Carruthers-Smith <keegan.csmith@gmail.com>
To: notmuch@notmuchmail.org
Subject: notmuch over ssh
Date: Wed, 10 Feb 2021 11:52:47 +0200 [thread overview]
Message-ID: <m2im70gsgg.fsf@gmail.com> (raw)
Hello.
Thought I'd share a hack I've been using recently. I have my
notmuch database on another machine. I wanted to access it via my
local emacs session. I didn't want to ssh in to the machine or
sync the data to another machine. I realised all communication is
done via the notmuch binary, so I wrote a wrapper script which
runs notmuch via ssh:
#!/usr/bin/env bash args=() for var in "$@" do
args+=($(printf '%q' "$var"))
done exec ssh real.local -- notmuch "${args[@]}"
Note I have hardcoded the remote (real.local). I also needed to
escape arguments since the remote shell had a tendancy to
interpret them. This escaping isn't fullproof, but has been
working so far.
I put the above script on my PATH as "notmuch", and emacs
magically uses it. Alternatively you could set the notmuch-command
to point to the above shell script.
Cheers,
Keegan
next reply other threads:[~2021-02-10 9:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 9:52 Keegan Carruthers-Smith [this message]
2021-02-10 10:51 ` notmuch over ssh Tomi Ollila
2021-02-10 11:35 ` Chris Coutinho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2im70gsgg.fsf@gmail.com \
--to=keegan.csmith@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).