]> git.cworth.org Git - obsolete/notmuch-wiki/blobdiff - remoteusage/aboriginal.mdwn
added #EOF to help noticing eos (helped to eat my own dogfood again)
[obsolete/notmuch-wiki] / remoteusage / aboriginal.mdwn
index ccaded1c6101895c9416d5372f4790fb602b2170..3d012b8eed684b115b2f2adc9b5820ff52d7831e 100644 (file)
@@ -23,8 +23,8 @@ Write the following code to a file, for example `remote-notmuch.sh`.
        # http://notmuchmail.org/remoteusage/aboriginal/
 
        set -eu
        # http://notmuchmail.org/remoteusage/aboriginal/
 
        set -eu
-       # To trace execution, outcomment next line. Note that emacs input may ...
-       #exec 2>>remote-errors; echo -- >&2; set -x # ... change (no stderr).
+       # To trace execution, uncomment next line.
+       #BASH_XTRACEFD=6; exec 6>>remote-errors; echo -- >&6; set -x
 
        readonly SSH_CONTROL_SOCK='~'/.ssh/master-user@host:22
 
 
        readonly SSH_CONTROL_SOCK='~'/.ssh/master-user@host:22
 
@@ -57,6 +57,7 @@ Write the following code to a file, for example `remote-notmuch.sh`.
        fi
 
        echo " See`sed '1d;2d;s/.//;q' "$0"` for help."
        fi
 
        echo " See`sed '1d;2d;s/.//;q' "$0"` for help."
+       #EOF
 
 Note the `0.1` in ssh command line. It is used to avoid any opportunistic
 behaviour ssh might do; for example if control socket is not alive ssh
 
 Note the `0.1` in ssh command line. It is used to avoid any opportunistic
 behaviour ssh might do; for example if control socket is not alive ssh
@@ -73,12 +74,15 @@ using the following command line:
 (replace `[user@]remotehost` with your login info). Doing this the
 above wrapper script can be run unmodified. After the above command has
 been run on **one terminal**, enter `chmod +x remote-notmuch.sh` in
 (replace `[user@]remotehost` with your login info). Doing this the
 above wrapper script can be run unmodified. After the above command has
 been run on **one terminal**, enter `chmod +x remote-notmuch.sh` in
-**another terminal** and then test the script with `./remote-notmuch.sh help`
+**another terminal** and then test the script with
 
 
-Note that the '~' is inside single quotes for a reason. In this
-case shell never expand it to `$HOME` -- ssh does it by not reading
-`$HOME` but checking the real user home directory from `/etc/passwd`.
-For security purposes this is just how it should be.
+        ./remote-notmuch.sh help
+
+Note that the '~' in the ssh command line above is inside single quotes
+for a reason. In this case shell never expand it to `$HOME` -- ssh does
+it by not reading `$HOME` but checking the real user home directory
+from `/etc/passwd`.  For security purposes this is just how it should
+be.
 
 ## Tune
 
 
 ## Tune
 
@@ -133,3 +137,19 @@ machine, checking/inotifying when new mail arrives. When mail arrives it
 could send message back to local host, where a graphical client (to be written)
 pops up on display providing info about received mail (and exiting this
 graphical client connection to remote host is terminated).
 could send message back to local host, where a graphical client (to be written)
 pops up on display providing info about received mail (and exiting this
 graphical client connection to remote host is terminated).
+
+## Troubleshooting
+
+If you experience strange output when using from emacs first attempt to just
+run
+
+        ./remote-notmuch.sh help
+
+from command line and observe output. If it looks as it should be next uncomment
+the line
+
+        #BASH_XTRACEFD=6; exec 6>>remote-errors; echo -- >&6; set -x
+
+in `./remote-notmuch.sh` and attempt to use it from emacs again -- and then
+examine the contents of `remote-errors` in the working directory emacs was
+started.