emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/opam-switch-mode c8ca450330 06/31: hint on other shells; u


From: ELPA Syncer
Subject: [nongnu] elpa/opam-switch-mode c8ca450330 06/31: hint on other shells; update README
Date: Mon, 14 Nov 2022 08:59:59 -0500 (EST)

branch: elpa/opam-switch-mode
commit c8ca450330d7aea3cbb31a15c23f39947ea21877
Author: Hendrik Tews <Hendrik.Tews@kernkonzept.com>
Commit: Hendrik Tews <Hendrik.Tews@kernkonzept.com>

    hint on other shells; update README
---
 README.md    | 32 ++++++++++++++++++++++++++------
 opam-mode.el |  5 ++++-
 2 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index f55d50df8d..8707c20673 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,32 @@
 
 Provide command `opam-set-switch` to change the opam switch of the
 running emacs session. The command reads the name of the switch in
-the minibuffer, providing completion with all available switches.
-With no input (i.e., leaving the minibuffer empty) the environment
-is reset to the state before the first call of `opam-set-switch`.
-
-For obvious reasons, `opam-set-switch` does not change the switch
-of any other shell.
+the minibuffer, providing completion with all available switches,
+see the documentation of `opam-set-switch` below.
 
 Contrary to the file name, this file does not (yet) provide a minor
 mode.
+
+## Command `opam-set-switch`
+
+Invoke with `M-x opam-set-switch`.
+
+Chose and set an opam switch.
+
+Set opam swith SWITCH-NAME, which must be a valid opam switch
+name. When called interactively, the switch name must be entered
+in the minibuffer, which forces completion to a valid switch name
+or the empty string.
+
+Setting the opam switch for the first time inside emacs will save
+the current environment. Using the empty string for SWITCH-NAME
+will reset the environment to the saved values.
+
+The switch is set such that all process invocations from emacs
+respect the newly set opam switch. In addition to setting
+environment variables such as PATH and CAML_LD_LIBRARY_PATH, this
+also sets `exec-path`, which controls emacs' subprocesses
+(`call-process`, `make-process` and similar functions).
+
+For obvious resons, `opam-set-switch` will only affect emacs and
+not any other shells outside emacs.
diff --git a/opam-mode.el b/opam-mode.el
index ccaf7a5c7d..83790d21db 100644
--- a/opam-mode.el
+++ b/opam-mode.el
@@ -220,7 +220,10 @@ emacs respect the newly set opam switch. In addition to 
setting
 environment variables such as PATH and CAML_LD_LIBRARY_PATH, this
 also sets `exec-path', which controls emacs'
 subprocesses (`call-process', `make-process' and similar
-functions)."
+functions).
+
+For obvious resons, `opam-set-switch' will only affect emacs and
+not any other shells outside emacs."
   (interactive
    (let* ((switches (opam-get-switches))
           (default (car switches))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]