Skip to content

Added Emacs Tips Documentation #3247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 1, 2022
Prev Previous commit
Next Next commit
docs: revised emacs tramp docs
  • Loading branch information
Mainstay-Noah-Huppert committed Jul 27, 2022
commit a0e965a2816844ff18a92ea09b6f19253ca956a5
5 changes: 3 additions & 2 deletions docs/ides/configuring-emacs-tramp.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ To fix this:
```lisp
(setq tramp-default-method "ssh")
```
2. Be sure to set the hostname on the workspace to the `coder.<name>` format:
2. Then on your Coder workspace instance be sure to set the hostname to the `coder.<name>` format:
```bash
hostname coder.<name>
```
This can also be done in the workspace Terraform template by setting workspace isntance's hostname to the data `coder_workspace.name` attribute. How this is done depends on how the instance is provisioned.
3. Next in the shell profile file on the workspace (ex., `~/.bashrc`) add the following:
```bash
ansi_term_announce_host() {
Expand All @@ -52,4 +53,4 @@ To fix this:

ansi_term_announce
```
Ansi Term expects the terminal running inside of it to send escape codes to inform Emacs of the hostname, user, and working directory. The above code sends these escape codes and associated data whenever the terminal logs in and whenever the directory changes.
Ansi Term expects the terminal running inside of it to send escape codes to inform Emacs of the hostname, user, and working directory. The above code sends these escape codes and associated data whenever the terminal logs in and whenever the directory changes. The expression in step 1 lets Emacs know that you are accessing the hostname these escape codes announce via SSH.