X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=remoteusage.mdwn;h=fd6ecdf272ec9ed9a854d292c3dcd8a985e43e8a;hb=9c27922986ea4e9760c33dcc964e2fb6e545d3ed;hp=09447a1edb063367d3b5e319a377a3d994f5a4d5;hpb=12695fff2e57f11d207d398f0f1100c2ca9f902b;p=notmuch-wiki diff --git a/remoteusage.mdwn b/remoteusage.mdwn index 09447a1..fd6ecdf 100644 --- a/remoteusage.mdwn +++ b/remoteusage.mdwn @@ -54,18 +54,17 @@ be necessary in the furture. USER="user_name" SSH_HOST="server_name" NOTMUCH_REMOTE_BIN="/path/to/notmuch/on/server" - CACHE=${HOME}/.notmuch-cache.d + CACHE="${HOME}/.notmuch-cache.d" notmuch_run () { if [ $1 = "search" ]; then - OUT=$($SSH_BIN $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN $@) - echo "$OUT" | while read line; do - echo "$line"; - sleep 0.1; - done + $SSH_BIN $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN $@ | while read line; do + sleep 0.1 + echo "${line}" + done else - $SSH_BIN $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN $@ + $SSH_BIN $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN $@ fi } @@ -81,8 +80,8 @@ be necessary in the furture. scp ${SSH_HOST}:${1} "${FILE_DIR}" > /dev/null 2>&1 retcode="${?}" if [ "${retcode}" -ne "0" ]; then - echo "Failed to fetch file" 1>&2 - exit ${retcode} + echo "Failed to fetch file" 1>&2 + exit ${retcode} fi } @@ -120,9 +119,11 @@ message text. (defun notmuch-show-get-filename () (let* ((orig-filename (notmuch-show-get-prop :filename)) - (retvalue (shell-command-to-string (concat notmuch-command - " --get " - orig-filename)))) + (retvalue (progn + (message "Downloading... ") + (shell-command-to-string (concat notmuch-command + " --get " + orig-filename))))) (replace-regexp-in-string "\n" "" retvalue))) This will will use the "--get" option of the above