From 7f2a6a8f2c21b45576302102b68024e9e5ba5282 Mon Sep 17 00:00:00 2001 From: Greg Hendershott Date: Tue, 16 Apr 2024 08:15:18 -0400 Subject: [PATCH] Explain direnv scenario in back end scenarios example of Guide Extra documentation for issue #706. --- doc/racket-mode.org | 4 +++- doc/racket-mode.texi | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/racket-mode.org b/doc/racket-mode.org index 59047b54..e37694c3 100644 --- a/doc/racket-mode.org +++ b/doc/racket-mode.org @@ -412,12 +412,14 @@ In the common case there is only one back end, on the same local host as Emacs, {{{img(scenario-0, Emacs front end and one local back end)}}} -However you can configure using any number of back ends on any number of local or remote hosts. +However you can configure using any number of back ends on any number of local or remote host paths. As one example, you can have multiple back ends on the local host. One back end is used for a project under a specific subdirectory, and the other back end for all others. (Perhaps one project needs Racket built from source, and everything else uses an installed, older version of Racket. By using different back ends, not only will ~racket-run~ use the desired version of Racket for a file, so will commands for documentation or visiting definitions.) {{{img(scenario-1, Emacs front end and two local back ends --- one for a project path)}}} +(Note: If you use various versions of Racket via [[https://direnv.net/][~direnv~]] combined with the [[https://github.com/purcell/envrc][~envrc~ Emacs package]], you still need a distinct back end for each project. To arrange this, add or modify a ~.dir-locals.el~ file next to each ~.envrc~ file; {{{see(racket-add-back-end)}}}.) + Furthermore, you could work with a project located on a remote host, whose files you edit using TRAMP. You also want the back end to run there. For a remote host, Racket Mode copies its back end source files to the remote when necessary, and runs the back end using ssh. {{{img(scenario-2, Emacs front end and a back end on a remote host)}}} diff --git a/doc/racket-mode.texi b/doc/racket-mode.texi index e658c047..99f5ea52 100644 --- a/doc/racket-mode.texi +++ b/doc/racket-mode.texi @@ -868,12 +868,14 @@ In the common case there is only one back end, on the same local host as Emacs, @image{scenario-0,,, Emacs front end and one local back end. Command I/O via pipe (local) or ssh (remote). Each back end provides zero or more REPLs.,.svg} -However you can configure using any number of back ends on any number of local or remote hosts. +However you can configure using any number of back ends on any number of local or remote host paths. As one example, you can have multiple back ends on the local host. One back end is used for a project under a specific subdirectory, and the other back end for all others. (Perhaps one project needs Racket built from source, and everything else uses an installed, older version of Racket. By using different back ends, not only will @code{racket-run} use the desired version of Racket for a file, so will commands for documentation or visiting definitions.) @image{scenario-1,,, Emacs front end and two local back ends --- one for a project path. Command I/O via pipe (local) or ssh (remote). Each back end provides zero or more REPLs.,.svg} +(Note: If you use various versions of Racket via @uref{https://direnv.net/, @code{direnv}} combined with the @uref{https://github.com/purcell/envrc, @code{envrc} Emacs package}, you still need a distinct back end for each project. To arrange this, add or modify a @code{.dir-locals.el} file next to each @code{.envrc} file; @xref{racket-add-back-end}.) + Furthermore, you could work with a project located on a remote host, whose files you edit using TRAMP@. You also want the back end to run there. For a remote host, Racket Mode copies its back end source files to the remote when necessary, and runs the back end using ssh. @image{scenario-2,,, Emacs front end and a back end on a remote host. Command I/O via pipe (local) or ssh (remote). Each back end provides zero or more REPLs.,.svg}