ρEmacs is a preconfigured distribution of GNU Emacs editor for Microsoft Windows. Being primarily designed for Lisp-based development, it is also bundled with several other popular programming languages. If you don't need them and just want to get some benefits of the features listed below, you may install only ρEmacs and nothing else.
You may prefer ρEmacs because of the following set of features:
The recent version of ρEmacs includes version 25 of GNU Emacs text editor with (currently extinct) EmacsW32 extension package. Although not everything from EmacsW32 works now, it still may be useful in several circumstances. It's not recommended to install ρEmacs at the write-protected system folders.
ρEmacs installer will ask where do you want to store your personal settings and data. The following three options are available:
You can change the path of the home directory of non-portable ρEmacs at any time through the submenu item named `Set Home Directory' at the top `((' menu. It's recommended to choose a path without spaces or non-ASCII characters for the ρEmacs HOME. The current path to ρEmacs HOME is available in `About Rho' buffer, under the Emacs `Help' menu.
In most cases you will most likely need only the `Basic Enhancements' package listed above and install other packages relevant to your needs manually.
Automated package installation is possible through the MELPA repository available with M-x list-packages command.
To install a package manually, you need to place it inside the `<ρEmacs Home>/.emacs.d' directory (which is already added to the Emacs load path). There could be two kinds of extensions:
A quick glimpse at some advanced Emacs features and extensions.
When working on a large project with the huge amount of different files, shells and REPLs, it's often useful to open them in several Emacs buffers simultaneously, for example, as at the screenshot below. Such layout allows to get better overview and makes it possible to switch between the buffers quickly.
Emacs documentation section on windows explains in detail the commands you can use to split or resize them. Emacs 24+ also has a handy built-in M-x speedbar command, which allows to navigate at the current directory tree visually (by default it opens in a separate frame, the optional sr-speedbar mode of the `Advanced enhanmcements' package opens speedbar in a existing frame). The ido-mode may be used as a convenient keyboard-driven alternative for speedbar. It's also possible to save a current window configuration with winsav save mode (could be enabled in winsav customization group: M-x customize-group winsav), although it works a little bit clumsy.
If you prefer mouse, the tabbar mode (enabled by default) is a click away. It has one not so obvious feature - the ability to switch between buffer mode window collections with mouse wheel. Move the mouse cursor over the tab bar at the top of a window and scroll the mouse wheel. The tabbar mode will switch window collections as you scroll.
highlight-symbol, column-marker and linum modes bring some cosmetic features to Emacs, which usually could be found only in full-blown IDEs, such as Eclipse. Line numbering, symbol highlighting (green) and line width limiting "gutter" (blue) are shown at the screenshot below. The symbol highlighting operations are bound to C-f3, M-f3 and S-f3 keys (all these features will be available automatically with the relevant major modes, if `Basic enhancements' option was checked during the installation). The linum mode may work ungraceful with the auto complete mode.
The ido-mode could be described as the iswitchb mode on steroids (it also works with find-file and some other cases). Its advantages over the default iswitchb are: flexy completion (if you have buffers named `core.clj' and `core.cljs' you need to type only `crls' to narrow the selection), filtering, ability to switch between items with keyboard and automatic path expansion. With ido it's also possible to quickly jump to the root or home folders with simple keystrokes (`//' and `~/' respectively). The `Basic enhancements' installer option makes this mode enabled by default.
YASnippet mode allows to insert predefined code templates
at the current point location with the ability
quickly switch between the internal template insertion points. To insert a template you need to type a template
abbreviation and press the expansion trigger keyboard shortcut (TAB in the case of ρEmacs;
minor mode also should be active). For example, in a buffer with the `Clojure' major mode, type
The M-x lgrep and M-x rgrep Emacs commands do exactly this. It's also possible to use a little bit lower level M-x grep command. To replace a text in multiple files, use the dired query-replace-regexp function. There are more options which could be installed separately.
Emacs has built-in support of some common version control systems. Third party VC extensions are also available. Note that you need to place your ssh keys and other personal VC settings into the ρEmacs home directory to use VC from Emacs.
Because SLIME is an advanced IDE by itself, there is no need in such monster things as CEDET or ECB. But it would be nice to have a project management system in the sense of Visual Studio `solutions'. Although not obvious, it's possible in vanilla Emacs with M-x desktop-save and M-x desktop-change-dir commands (it's necessary to save a desktop file in the project root directory). But there is a better third party solution exist: Bookmark+ desktop bookmarks. For example, there is a project directory tree with root in the ~/lisp/development/my-app and you are editing its files. To add a bookmark to the current desktop, you need to issue the following commands:
The C-x r l command allows to list all bookmarks and quickly switch between saved project desktops, it's also possible to clear the current desktop with M-x desktop-clear command.
It's possible to install the following Lisp dialects with ρEmacs:
|Lisp dialect||Version||Emacs mode||Dependency management1||Requirements|
|Clojure||1.8||Cider||Leiningen 2||Java 1.6 or higher|
|ABCL||1.1.5||SLIME||Quicklisp||Java 1.6 or higher|
|ECL3||16.1.3||SLIME||Quicklisp||Visual C++ compiler|
For the detailed information about dependency management see `Dependency Management' section below.
2 CLISP 2.49 contains a bug that prevents it to work with Emacs properly on Windows.
3 Will not work if path to ρEmacs home directory contains spaces or non-ASCII characters.
Any of the Lisp implementations could be upgraded or downgraded by replacing contents of its subfolder under the `<ρEmacs Installation Directory>/bin' directory.
Hint: you can launch any installed Common Lisp implementation using M-- M-x slime <RET> implementation-name <RET> Emacs keyboard shortcut. Use the <TAB> key after the first <RET> to list available implementation names.
Important: what to do if a SLIME REPL evaluation request freezes? If you are running a multithreaded Lisp, you can save the existing Lisp environment by recurrent connection to the corresponding Lisp process. To accomplish this, use the M-x slime-connect command or simply command from the previous paragraph. For example, if you are running Clozure CL, type M-- M-x slime <RET> ccl <RET> and answer 'No' to the following SLIME question. Clozure then will create additional thread in the current Lisp environment, and you could continue the work.
By using lispx-proxy you can easily launch Common Lisp, Clojure or Scheme files as scripts and create more complex application distributions.
lispx-proxy is fully integrated into ρEmacs, and you could use all installed Common Lisp implementations and all ρEmacs ASDF repositories while executing Common Lisp code. ρEmacs knows about lispx-proxy `executable source code distribution' structure, and all ASDF systems and resources from the `shared' folder of a distribution will be available to the inferior Lisp (the distribution should be placed into one of the ρEmacs ASDF repositories). In other words, you can easily develop lispx-proxy applications with ρEmacs.
Emacs has ability to emulate command shell, which could be used to run Lisp implementations (by issuing the corresponding commands offered by Rho Shell) without overhead made by SLIME's Swank or Quicklisp. This may be useful when you want to reduce memory footprint of a generated program binary.
It is also possible to run any Lisp implementation out of Emacs using system-wide lispx-proxy. For example, you could run SBCL command-line REPL with the following command: lispx -i sbcl --repl issued in your regular Windows shell. To run Clojure REPL type lispx -l clojure --repl in your command prompt. Common Lisp package management systems are not automatically available with this scenario, although the REPL or scripts could use any already installed ASDF-systems or Java/Clojure libraries from `<ρEmacs Home>/clojure/lib'.
If necessary, ρEmacs allows to install a local copy of Common Lisp HyperSpec and browse keyword documentation from SLIME using C-c C-d h keyboard shortcut.
There are several places which are considered by ρEmacs as ASDF repositories:
where <HOME> is a ρEmacs home directory. It's necessary to place directories with ASDF systems in one of these folders to make them accessible by ASDF. In addition, you can store Leiningen Clojure projects in <HOME>\clojure directory (it has no special meaning for Leiningen).
It's possible to disable any ASDF repository (including the repositories inside lispx-proxy executable source distributions) by placing a file named `.noindex' into it.
Quicklisp is automatically preloaded for CL implementations with built-in ASDF2 or above (currently for all implementations included into ρEmacs). It's immediately possible to use ql:apropos-system and ql:quickload functions (for details see the manual at Quicklisp home site).
WARNING: a Clojure Java process may remain in memory after the Emacs shutdown, because it has not been spawned by Emacs itself. Although ρEmacs tries to work around this issue and close the process before the Emacs shutdown, be aware of this.
There is currently poor support of Scheme and Racket in ρEmacs. For package management you can use the built-in Racket PLaneT facility according to the documentation. ρEmacs brings nothing special in this case.
Common Lisp implementations included in ρEmacs use ASDF2 translation facility to manage location of compiled fasl files. By default, compiled files are placed into `.fasl-cache' subfolder of the ρEmacs home directory. Fasl cache could be cleaned with `Clear Fasl Cache' menu item under the `((' menu group. It may be the first thing to do when something fails by no obvious reason.
|Item||Version||Included tools and libraries|
|Python||2.7.13||The default Python pip package manager is available as the `pip2' command|
|Python||3.6.1||The default Python pip package manager is available as the `pip3' command|
|JDK||8.0u141||Apache ANT 1.10.1, Apache Maven 3.5, Gradle 4.0.1|
|MinGW-x64||installed by pacman||Boost|
The `rho' command is available through the system PATH and could be used to open files from the command line or to use Emacs as an external editor in some applications (this could be useful with panel file managers such as FAR Manager or, for example, Firefox It's all text addon). The `rho' command accepts only one file argument, though.
The `lispx' command is also available at the command prompt and could be used for Lisp scripting. Common Lisp scripts can use all ASDF systems installed into ρEmacs repositories, Clojure scripts may load libraries placed in the `<ρEmacs Home>/clojure/lib' directory.
© 2010-2017 g/christensen (gchristnsngmail.com)