Emacs: Difference between revisions
imported>Appetrosyan Added use of the file template. |
imported>Appetrosyan Added discussion of the different branches |
||
Line 4: | Line 4: | ||
== About == | == About == | ||
Emacs is an interactive graphical emacs lisp interpreter that comes with many applications, but is primarily used as a text and code editor. It has one of the largest repositories of packages of any similar code editor such as {{ic|vim}} or its fork {{ic|neovim}}. | Emacs is an interactive graphical emacs lisp interpreter that comes with many applications, but is primarily used as a text and code editor. It has one of the largest repositories of packages of any similar code editor such as {{ic|vim}} or its fork {{ic|neovim}}. | ||
=== Features === | |||
Emacs is often valued as a general purpose programming environment. Its power comes from its | |||
* Extensibility | |||
* Automatic self-documenting behaviour | |||
* Flexibility | |||
* Syntax awareness | |||
* language server protocol support | |||
* potential for reproducible portable literate configurations | |||
Emacs, much like NixOS can rebuild and re-fetch all of its packages based on its initialisation file alone, if one chooses to use an extension called {{ic|(use-package)}}. Such a configuration file can be version controlled and used in all compatible operating systems. Certain issues are possible, when mixing different versions of Emacs, in particular a configuration file tailored towards emacs with native compilation, may misbehave on non-native compiling versions, unless only the emacs lisp code is shared between them. | |||
==== Unstable branches ==== | |||
As of July 2021, the Nix community offers [https://github.com/nix-community/emacs-overlay/blob/f177e5d14ad2e1edceb63f3ab8aa9748ebe6383c/default.nix#L104 7 variants of GNU Emacs] as overlays: emacsGit, emacsGcc, emacsPgtk, emacsPgtkGcc, emacsUnstable, emacsGit-nox, and emacsUnstable-nox. | |||
===== Pure GTK ===== | |||
Offers better integration with wayland compositors, in particular, there's better support for sharing the kill ring contents with the system clipboard. | |||
===== GCC ===== | |||
Branches offer a means for automatic, asynchronous native compilation of emacs lisp into native code, that is then transparently used whenver the original versions of the functions are requested. | |||
== Installation == | == Installation == | ||
=== Emacs overlay === | === Emacs overlay === | ||
For installing one of the unstable branches of emacs, add the following lines to {{ic|/etc/nixos/configuration.nix}} (replace emacsPgtkGcc with the variant of your choice). | |||
{{file|configuration.nix|nix|<nowiki> | {{file|configuration.nix|nix|<nowiki> | ||
{ | { |