On Sun, 21 Nov 2010 22:51:29 +0100, Michal Sojka <sojk...@fel.cvut.cz> 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 _______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch