Disproject is a package for GNU Emacs that implements Transient menus for
dispatching project-related commands on top of the project.el
library. It
aims to provide a more featureful version of the project-switch-project
command, which it is inspired by. Those who are familiar with Projectile may
also find similarities to projectile-commander
.
In addition to numerous project.el
commands made available in the menu, some
other notable features include:
- Auto-detect current project on menu start.
- “Custom dispatch” menu for per-project transient suffixes like compilation
commands (see
disproject-custom-suffixes
). - Switch between projects with open buffers.
- Transient option to prefer displaying buffers to another window when executing commands.
- Ensure directory/project-based environments when executing commands from outside a project (see an envrc issue on this). This behavior is supported for the following packages: envrc; mise.el.
- When available, pre-configured menu commands for: magit; magit-todos.
- Customizable variables to substitute some commands in the menu and more (see Customization).
See images for more screenshots of Disproject menus.
Disproject is available in MELPA and MELPA Stable. See Getting Started instructions for using MELPA.
Disproject is also available as a GNU Guix package.
The stable version can be found in the (gnu packages emacs-xyz)
module under
the name emacs-disproject
. It may be installed in the user profile like so:
guix install emacs-disproject
Alternatively, one may use the package definition in ./guix.scm
to install a
development version of Disproject from the repository. For example, to install
in the user profile, run the following in this repository’s root directory:
guix package --install-from-file=guix.scm
Disproject tries to provide usable defaults that don’t require additional
packages or significant configuration; however, it does not provide any keybind
for disproject-dispatch
by default. The following is a suggested minimal
setup using use-package
:
(use-package disproject
;; Replace `project-prefix-map' with `disproject-dispatch'.
:bind ( :map ctl-x-map
("p" . disproject-dispatch)))
A complete list of variables for customizing Disproject can be found by
searching for the disproject
group via M-x customize-group
.
Users may find that they would like to swap out certain commands in the main
dispatch menu; for example, to replace the default project-eshell
used in
disproject-shell
with project-shell
. In addition to the mentioned group,
this particular subset of customizable variables can be found in the
disproject-commands
customization group.
Note that custom commands are expected to respect certain variables in order for
transient state to apply correctly; a list of the variables that are set can be
found in disproject-with-env-apply
. Functions for setting up variables from
transient state can be found via M-x shortdoc disproject-environment
.