Home page: | https://github.com/pierre-rouleau/about-erlang |
---|---|
Navigation: | Prev, Top, Next. |
Project: | |
Created: | Saturday, June 5 2021. |
Author: | Pierre Rouleau <prouleau001@gmail.com> |
Modified: | 2021-06-07 15:56:58, updated by Pierre Rouleau. |
Copyright: | © 2021, Pierre Rouleau |
Table of Contents
The PEL Emacs system extends Emacs takes advantage of Emacs flexible customization system to provide an easy to customize Emacs system. With it you can install or remove external packages by identifying what you need with Emacs customization system. It also provides an extensive set of PDF-based documentation that documents various Emacs features.
The best way to use its PDF documentation is to access the PEL Topics Index PDF using a web browser that can render PDF inside a browser window, such as Firefox.
With PEL you can take advantage of the Specialized OS Shells for Erlang . These shells store the absolute path of the directory holding Erlang man pages inside the value of the PEL_ERLANG_MAN_PARENT_DIR environment variable.
You can inform PEL to use that environment variable so that Emacs will be able to open the man files related to the version of Erlang used by the current OS shell where Emacs runs.
Open Emacs and access the pel-erlang-environment customization group. You can do this in various ways as described at the top of the PEL 𝕻𝔩 - Erlang PDF. From outside of an erlang file, you can type on of those commands:
M-x customize-group pel-erlang-environment RET
, or<f11> SPC e <f2>
then select the Pel Erlang Environment link that shows at the bottom of the window.
Once in that window select the pel-erlang-man-parent-rootdir
user-option
and set it such that it reads the path from the PEL_ERLANG_MAN_PARENT_DIR
environment variable. You should see something like the following:
Use the Emacs buttons at the top of the window to save your customization.
From then on, when you open a Erlang man page from within Emacs that is running inside a specialized shell, the man file selected will correspond to the version of Erlang selected for the OS specialized shell.
The following screen shot shows two terminal shells that have been specialized for different versions of Erlang. The one on the left is using Erlang 23.3.4 as installed by Homebrew. The one on the right is using Erlang 21.3.8.16 installed by asdf-vm using the native compiler on macOS. Each one show 4 windows:
- A vterm window chowing the result of the command
version-erl
that displays the version of Erlang available to the shell. - A Erlang file edited. This window has the focus, so the Emacs menu at the top of the Emacs frame is for Erlang buffers,
- A window with the Erlang shell, erl, running. The first thing this does is print version information.
- A window showing the end of the erl man page where you can read their corresponding version of Erlang erts.
PEL provides other support for Erlang.