Added Zsh-TRAMP-hack to remote Emacs article.

This commit is contained in:
tastytea 2019-10-17 21:09:38 +02:00
parent 3d33203774
commit 4c5d314b64
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -135,7 +135,6 @@ for p in "${@}"; do
elif [[ "${p:0:1}" == "+" ]]; then
params+=( "${p}" )
elif [[ "${p}" == "--sudo" ]]; then
# This only works if the user can access the file.
sudo=1
elif [[ "${p}" == "--local" ]]; then
# Use local server, for use with --sudo.
@ -164,6 +163,10 @@ emacsclient -f ~/.emacs.d/server/server "${params[@]}"
{{< / highlight >}}
----
I had to add `[[ "${TERM}" = "dumb" ]] && unsetopt zle` to my Zsh configuration
to prevent TRAMP connections from hanging all the time. Thanks to Darius for
https://emacs.stackexchange.com/a/45810[their answer on StackExchange].
== Shell configuration
Now we should set `VISUAL` and `EDITOR` to the wrapper and set up some nice,
@ -230,3 +233,4 @@ echo 'Defaults env_keep += "SSH_CONNECTION"' >> /etc/sudoers.d/ssh_vars
* Updated 2019-05-12: Add `-f` argument to emacsclient.
* Updated 2019-10-06: Support files with spaces in emacsremote and allow to
open files the user can't read (for use with emacsremote --sudo).
* Updated 2019-10-17: Added Zsh-hack to prevent hanging TRAMP-connections.