fbpx
Wikipedia

Emacs

Emacs /ˈmæks/, originally named EMACS (an acronym for "Editor MACroS"),[3][4][5] is a family of text editors that are characterized by their extensibility.[6] The manual for the most widely used variant,[7] GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor".[8] Development of the first Emacs began in the mid-1970s, and work on its direct descendant, GNU Emacs, continues actively; the latest version is 28.2, released in September 2022.

Emacs
Org-mode, Magit, and Dired buffers in GNU Emacs
Original author(s)David A. Moon,
Guy L. Steele Jr.
Developer(s)Various free/libre software developers, including volunteers and commercial developers
Initial release1976; 47 years ago (1976)[1][2]
Written inLisp, C
Operating systemCross-platform
TypeText editor
Websitewww.gnu.org/software/emacs/ 

Emacs has over 10,000 built-in commands and its user interface allows the user to combine these commands into macros to automate work. Implementations of Emacs typically feature a dialect of the Lisp programming language, allowing users and developers to write new commands and applications for the editor. Extensions have been written to, among other things, manage files, remote access,[9] e-mail, outlines, multimedia, git integration, and RSS feeds,[10] as well as implementations of ELIZA, Pong, Conway's Life, Snake, Dunnet, and Tetris.[11]

The original EMACS was written in 1976 by David A. Moon and Guy L. Steele Jr. as a set of Editor MACroS for the TECO editor.[2][3][4][5][12] It was inspired by the ideas of the TECO-macro editors TECMAC and TMACS.[13]

The most popular, and most ported, version of Emacs is GNU Emacs, which was created by Richard Stallman for the GNU Project.[14] XEmacs is a variant that branched from GNU Emacs in 1991. GNU Emacs and XEmacs use similar Lisp dialects and are, for the most part, compatible with each other. XEmacs development is inactive.

Emacs is, along with vi, one of the two main contenders in the traditional editor wars of Unix culture. Emacs is among the oldest free and open source projects still under development.[15]

History

 
Emacs was started by Guy L. Steele Jr. as a project to unify the many divergent TECO command sets and key bindings at MIT[4]
 
David A. Moon
 
Emacs' interface was influenced by the design of the space-cadet keyboard, which sought to enable users to type as many different kinds of input as possible.[16]

Emacs development began during the 1970s at the MIT AI Lab, whose PDP-6 and PDP-10 computers used the Incompatible Timesharing System (ITS) operating system that featured a default line editor known as Tape Editor and Corrector (TECO). Unlike most modern text editors, TECO used separate modes in which the user would either add text, edit existing text, or display the document. One could not place characters directly into a document by typing them into TECO, but would instead enter a character ('i') in the TECO command language telling it to switch to input mode, enter the required characters, during which time the edited text was not displayed on the screen, and finally enter a character (<esc>) to switch the editor back to command mode. (A similar technique was used to allow overtyping.) This behavior is similar to that of the program ed.

By the 1970s, TECO was already an old program, initially released in 1962. Richard Stallman visited the Stanford AI Lab in 1976[17] and saw the lab's E editor, written by Fred Wright.[18] He was impressed by the editor's intuitive WYSIWYG (What You See Is What You Get) behavior, which has since become the default behavior of most modern text editors. He returned to MIT where Carl Mikkelsen, a hacker at the AI Lab, had added to TECO a combined display/editing mode called Control-R that allowed the screen display to be updated each time the user entered a keystroke. Stallman reimplemented this mode to run efficiently and then added a macro feature to the TECO display-editing mode that allowed the user to redefine any keystroke to run a TECO program.[5]

E had another feature that TECO lacked: random-access editing. TECO was a page-sequential editor that was designed for editing paper tape on the PDP-1 at a time when computer memory was generally small due to cost, and it was a feature of TECO that allowed editing on only one page at a time sequentially in the order of the pages in the file. Instead of adopting E's approach of structuring the file for page-random access on disk, Stallman modified TECO to handle large buffers more efficiently and changed its file-management method to read, edit, and write the entire file as a single buffer. Almost all modern editors use this approach.

The new version of TECO quickly became popular at the AI Lab and soon accumulated a large collection of custom macros whose names often ended in MAC or MACS, which stood for macro. Two years later, Guy Steele took on the project of unifying the diverse macros into a single set.[19] Steele and Stallman's finished implementation included facilities for extending and documenting the new macro set.[5] The resulting system was called EMACS, which stood for Editing MACroS or, alternatively, E with MACroS. Stallman picked the name Emacs "because <E> was not in use as an abbreviation on ITS at the time."[20] An apocryphal hacker koan alleges that the program was named after Emack & Bolio's, a popular Boston ice cream store.[21] The first operational EMACS system existed in late 1976.[22]

Stallman saw a problem in too much customization and de facto forking and set certain conditions for usage.[citation needed] He later wrote:[22]

EMACS was distributed on a basis of communal sharing, which means all improvements must be given back to me to be incorporated and distributed.

The original Emacs, like TECO, ran only on the PDP-10 running ITS. Its behavior was sufficiently different from that of TECO that it could be considered a text editor in its own right, and it quickly became the standard editing program on ITS. Mike McMahon ported Emacs from ITS to the TENEX and TOPS-20 operating systems. Other contributors to early versions of Emacs include Kent Pitman, Earl Killian, and Eugene Ciccarelli. By 1979, Emacs was the main editor used in MIT's AI lab and its Laboratory for Computer Science.[23]

Implementations

Early implementations

 
Zmacs, an Emacs for Lisp machines, an evolution of EINE and ZWEI
 
James Gosling wrote an Emacs-like editor to run on Unix (Gosling Emacs) in 1981

In the following years, programmers wrote a variety of Emacs-like editors for other computer systems. These included EINE (EINE Is Not EMACS) and ZWEI[24] (ZWEI Was EINE Initially), which were written for the Lisp machine by Mike McMahon and Daniel Weinreb, and Sine (Sine Is Not Eine),[25] which was written by Owen Theodore Anderson. Weinreb's EINE was the first Emacs written in Lisp. In 1978, Bernard Greenberg wrote Multics Emacs almost entirely in Multics Lisp at Honeywell's Cambridge Information Systems Lab. Multics Emacs was later maintained by Richard Soley, who went on to develop the NILE Emacs-like editor for the NIL Project, and by Barry Margolin. Many versions of Emacs, including GNU Emacs, would later adopt Lisp as an extension language.

James Gosling, who would later invent NeWS and the Java programming language, wrote Gosling Emacs in 1981. The first Emacs-like editor to run on Unix[citation needed], Gosling Emacs was written in C and used Mocklisp, a language with Lisp-like syntax, as an extension language.

Early Ads for Computer Corporation of America's CCA EMACS (Steve Zimmerman).[26] appeared in 1984.[27] 1985 comparisons to GNU Emacs, when it came out, mentioned free vs. $2,400.[28][irrelevant citation]


GNU Emacs

 
GNU Emacs running in a text console
 
GNU Emacs running on Microsoft Windows

Richard Stallman began work on GNU Emacs in 1984 to produce a free software alternative to the proprietary Gosling Emacs. GNU Emacs was initially based on Gosling Emacs, but Stallman's replacement of its Mocklisp interpreter with a true Lisp interpreter required that nearly all of its code be rewritten. This became the first program released by the nascent GNU Project. GNU Emacs is written in C and provides Emacs Lisp, also implemented in C, as an extension language. Version 13, the first public release, was made on March 20, 1985. The first widely distributed version of GNU Emacs was version 15.34, released later in 1985. Early versions of GNU Emacs were numbered as 1.x.x, with the initial digit denoting the version of the C core. The 1 was dropped after version 1.12, as it was thought that the major number would never change, and thus the numbering skipped from 1 to 13.[29] In September 2014, it was announced on the GNU emacs-devel mailing list that GNU Emacs would adopt a rapid release strategy and version numbers would increment more quickly in the future.[30]

GNU Emacs offered more features than Gosling Emacs, in particular a full-featured Lisp as its extension language, and soon replaced Gosling Emacs as the de facto Unix Emacs editor. Markus Hess exploited a security flaw in GNU Emacs' email subsystem in his 1986 cracking spree in which he gained superuser access to Unix computers.[31]

Most of GNU Emacs functionality is implemented through a scripting language called Emacs Lisp. Because about 70% of GNU Emacs is written in the Emacs Lisp extension language,[32] one only needs to port the C core which implements the Emacs Lisp interpreter. This makes porting Emacs to a new platform considerably less difficult than porting an equivalent project consisting of native code only.

GNU Emacs development was relatively closed until 1999 and was used as an example of the Cathedral development style in The Cathedral and the Bazaar. The project has since adopted a public development mailing list and anonymous CVS access. Development took place in a single CVS trunk until 2008 and was then switched to the Bazaar DVCS. On November 11, 2014, development was moved to Git.[33]

Richard Stallman has remained the principal maintainer of GNU Emacs, but he has stepped back from the role at times. Stefan Monnier and Chong Yidong were maintainers from 2008 to 2015.[34][35] John Wiegley was named maintainer in 2015 after a meeting with Stallman at MIT.[36] As of early 2014, GNU Emacs has had 579 individual committers throughout its history.[37]

XEmacs

 
XEmacs 21.5 on Linux

Lucid Emacs, based on an early alpha version of GNU Emacs 19, was developed beginning in 1991 by Jamie Zawinski and others at Lucid Inc. One of the best-known early forks in free software development occurred when the codebases of the two Emacs versions diverged and the separate development teams ceased efforts to merge them back into a single program.[38] Lucid Emacs has since been renamed XEmacs. Its development is currently inactive, with the most recent stable version 21.4.22 released in January 2009 (while a beta was released in 2013), while GNU Emacs has implemented many formerly XEmacs-only features.[39][better source needed]

Other forks of GNU Emacs

Other notable forks include:

  • Aquamacs – based on GNU Emacs (Aquamacs 3.2 is based on GNU Emacs version 24 and Aquamacs 3.3 is based on GNU Emacs version 25) which focuses on integrating with the Apple Macintosh user interface
  • Meadow – a Japanese version for Microsoft Windows[40]

Various Emacs editors

 
uEmacs/Pk 4.0.15 on Linux
 
The mg tiny Emacs-like editor in OpenBSD 5.3. Editing Ruby source code
 
JOVE running in a Debian box

In the past, projects aimed at producing small versions of Emacs proliferated. GNU Emacs was initially targeted at computers with a 32-bit flat address space and at least 1 MiB of RAM.[41] Such computers were high end workstations and minicomputers in the 1980s, and this left a need for smaller reimplementations that would run on common personal computer hardware. Today's computers have more than enough power and capacity to eliminate these restrictions, but small clones have more recently been designed to fit on software installation disks or for use on less capable hardware.[42]

Other projects aim to implement Emacs in a different dialect of Lisp or a different programming language altogether. Although not all are still actively maintained, these clones include:

  • MicroEMACS, which was originally written by Dave Conroy and further developed by Daniel Lawrence and which exists in many variations.
  • mg, originally called MicroGNUEmacs and, later, mg2a, a public-domain offshoot of MicroEMACS intended to more closely resemble GNU Emacs. Now installed by default on OpenBSD.
  • JOVE (Jonathan's Own Version of Emacs), Jonathan Payne's non-programmable Emacs implementation for UNIX-like systems.
  • MINCE (MINCE Is Not Complete Emacs), a version for CP/M and later DOS, from Mark of the Unicorn. MINCE evolved into Final Word, which eventually became the Borland Sprint word processor.
  • Perfect Writer, a CP/M implementation derived from MINCE that was included circa 1982 as the default word processor with the very earliest releases of the Kaypro II and Kaypro IV. It was later provided with the Kaypro 10 as an alternative to WordStar.
  • Freemacs, a DOS version that uses an extension language based on text macro expansion and fits within the original 64 KiB flat memory limit.
  • Zmacs, for the MIT Lisp Machine and its descendants, implemented in ZetaLisp.
  • Epsilon,[43] an Emacs clone by Lugaru Software. Versions for DOS, Windows, Linux, FreeBSD, Mac OS X and O/S 2 are bundled in the release. It uses a non-Lisp extension language with C syntax and used a very early concurrent command shell buffer implementation under the single-tasking MS-DOS.
  • PceEmacs is the Emacs-based editor for SWI-Prolog.
  • Hemlock, originally written in Spice Lisp, then Common Lisp. A part of CMU Common Lisp. Influenced by Zmacs. Later forked by Lucid Common Lisp (as Helix), LispWorks and Clozure CL projects. There is also a Portable Hemlock project, which aims to provide a Hemlock, which runs on several Common Lisp implementations.
  • edwin, an Emacs-like text editor included with MIT/GNU Scheme.

Editors with Emacs emulation

  • The Cocoa text system uses some of the same terminology and understands many Emacs navigation bindings. This is possible because the native UI uses the Command key (equivalent to Super) instead of the Control key.[44]
  • Eclipse (IDE) provides a set of Emacs keybindings.
  • Epsilon (text editor) Defaults to Emacs emulation and supports a vi mode.
  • GNOME Builder has an emulation mode for Emacs.
  • GNU Readline is a line editor that understands the standard Emacs navigation keybindings. It also has a vi emulation mode.
  • IntelliJ IDEA provides a set of Emacs keybindings.
  • JED has an emulation mode for Emacs.
  • Joe's Own Editor emulates Emacs keybindings when invoked as jmacs.
  • MATLAB provides Emacs keybindings for its editor.[45]
  • KornShell has an Emacs line editing mode that predates Gnu Readline.[46]
  • Visual Studio Code provides an extension to emulate Emacs keybindings.
  • Oracle SQL Developer can save and load alternative keyboard-shortcut layouts. One of the built-in layouts provides Emacs-like keybindings, including using different commands to achieve closer behavior.

Features

Emacs is primarily a text editor and is designed for manipulating pieces of text, although it is capable of formatting and printing documents like a word processor by interfacing with external programs such as LaTeX, Ghostscript or a web browser. Emacs provides commands to manipulate and differentially display semantic units of text such as words, sentences, paragraphs and source code constructs such as functions. It also features keyboard macros for performing user-defined batches of editing commands.

GNU Emacs is a real-time display editor, as its edits are displayed onscreen as they occur. This is standard behavior for modern text editors but EMACS was among the earliest to implement this. The alternative is having to issue a distinct command to display text, (e.g. after modifying it). This is done in line editors, such as ed (unix), ED (CP/M), and Edlin (MS-DOS).

General architecture

Almost all of the functionality in Emacs, including basic editing operations such as the insertion of characters into a file, is achieved through functions written in a dialect of the Lisp programming language. The dialect used in GNU Emacs is known as Emacs Lisp (Elisp), and was developed expressly to port Emacs to GNU and Unix. The Emacs Lisp layer sits atop a stable core of basic services and platform abstraction written in the C programming language, which enables GNU Emacs to be ported to a wide variety of operating systems and architectures without modifying the implementation semantics of the Lisp system where most of the editor lives. In this Lisp environment, variables and functions can be modified with no need to rebuild or restart Emacs, with even newly redefined versions of core editor features being asynchronously compiled and loaded into the live environment to replace existing definitions. Modern GNU Emacs features both bytecode and native code compilation for Emacs Lisp.

All configuration is stored in variables, classes, and data structures, and changed by simply updating these live. The use of a Lisp dialect in this case is a key advantage, as Lisp syntax consists of so-called symbolic expressions (or sexprs), which can act as both evaluatable code expressions and as a data serialisation format akin to, but simpler and more general than, widely known ones such as XML, JSON, and YAML. In this way there is little difference in practice between customising existing features and writing new ones, both of which are accomplished in the same basic way. The goal of Emacs' open design is to transparently expose Emacs' internals to the Emacs user during normal use in the same way that they would be exposed to the Emacs developer working on the git tree, and to collapse as much as possible of the distinction between using Emacs and programming Emacs, while still maintaining a stable, practical environment for novice users.

Interactive data

The main text editing data structure is the buffer, a memory region containing data (usually text) with associated attributes. The most important of these are:

  • The point: the editing cursor;
  • The mark: a settable location which, along with the point, enables selection of
  • The region: a conceptually contiguous collection of text to which editing commands will be applied;
  • The name and inode of the file the buffer is visiting (if any);
  • The default directory, where any OS-level commands will be executed from by default;
  • The buffer's modes, including a major mode possibly several minor modes
  • The buffer encoding, the method by which Emacs represents buffer data to the user;
  • and a variety of buffer local variables and Emacs Lisp state.

Modes, in particular, are an important concept in Emacs, providing a mechanism to disaggregate Emacs' functionality into sets of behaviours and keybinds relevant to specific buffers' data. Major modes provide a general package of functions and commands relevant to a buffer's data and the way users might be interacting with it (e.g. editing source code in a specific language, editing hex, viewing the filesystem, interacting with git, etc.), and minor modes define subsidiary collections of functionality applicable across many major modes (such as auto-save-mode). Minor modes can be toggled on or off both locally to each buffer as well as globally across all buffers, while major modes can only be toggled per-buffer. Any other data relevant to a buffer but not bundled into a mode can be handled by simply focussing that buffer and live modifying the relevant data directly.

Any interaction with the editor (like key presses or clicking a mouse button) is realized by evaluating Emacs Lisp code, typically a command, which is a function explicitly designed for interactive use. Keys can be arbitrarily redefined and commands can also be accessed by name; some commands evaluate arbitrary Emacs Lisp code provided by the user in various ways (e.g. a family of eval- region, buffer, and expression type commands). Even the simplest user inputs (such a printable characters) are effectuated as Emacs Lisp functions, such as the self-insert-command , bound to most keyboard keys in a typical text editing buffer by default, which parameterises itself with the locale-defined character associated with the key used to call it.

For example, pressing the f key in a buffer that accepts text input evaluates the code (self-insert-command 1 ?f), which inserts one copy of the character constant ?f at point. The 1, in this case, is determined by what Emacs terms the universal argument: all Emacs command code accepts a numeric value which, in its simplest usage, indicates repetition of an action, but in more complex cases (where repetition doesn't make sense) can yield other behaviours. These arguments may be supplied via command prefices, such as Control+u 7 f, or more compactly Meta+7 f, which expands to (self-insert-command 7 ?f). When no prefix is supplied, the universal argument is 1: every command implicitly runs once, but may be called multiply, or in a different way, when supplied with such a prefix. Such arguments may be also be non-positive where it makes sense for them to be so - it is up to the function accepting the argument to determine, according to its own semantics, what a given number means to it. One common usage is for functions to perform actions in reverse simply by checking the sign of the univeral argument, such as a sort command which sorts in obverse by default and in reverse when called with a negative argument, or undo/redo, which are simply negatives of each other (stepping forward and backward through a recursive history of diffs).

Command language

Because of its relatively large vocabulary of commands, Emacs features a long-established command language, to concisely express the keystrokes necessary to perform an action. This command language recognises the following shift and modifier keys: Ctrl, Alt, ⇧ Shift, Meta, Super, and Hyper. Not all of these may be present on an IBM-style keyboard, though they can usually be configured as desired. These are represented in command language as the respective prefices: C-, A-, S-, M-, s-, and H-. Keys whose names are only printable with more than one character are enclosed in angle brackets. Thus, a keyboard shortcut such as Ctrl+Alt+⇧ Shift+F9 (check dependent formulas and calculate all cells in all open workbooks in Excel) would be rendered in Emacs command language as C-A-S-<f9>, while an Emacs command like Meta+s f Ctrl+Meta+s (incremental file search by filename-only regexp), would be expressed as M-s f C-M-s. Command language is also used to express the actions needed to invoke commands with no default keybinding: for example, the command scratch-buffer (which initialises a buffer in memory for temporary text storage and manipulation), when invoked by name by the user, will be reported back as M-x scra <return>, the shortest sequence of keystrokes which uniquely lexicate it.

Dynamic display

Because Emacs predates modern standard terminology for graphical user interfaces, it uses somewhat divergent names for familiar interface elements. Buffers, the data that Emacs users interact with, are displayed to the user inside windows, which are tiled portions of the terminal screen or the GUI window, which Emacs refers to as frames; in modern terminology, an Emacs frame would be a window and an Emacs window would be a split. Depending on configuration, windows can include their own scroll bars, line numbers, sometimes a 'header line' typically to ease navigation, and a mode line at the bottom (usually displaying buffer name, the active modes and point position of the buffer among others). The bottom of every frame is used for output messages (then called 'echo area') and text input for commands (then called 'minibuffer').

In general, Emacs display elements (windows, frames, etc.) are not tied to any specific data or process. Buffers are not associated with windows, and multiple windows can be opened onto the same buffer, for example to see different parts of a long text side-by-side without scrolling, and multiple buffers can share the same text, for example to take advantage of different major modes in a mixed-language file. Similarly, Emacs instances are not associated with particular frames, and multiple frames can be opened displaying a single running Emacs process, e.g. a frame per screen in a multi-monitor setup, or a terminal frame connected via ssh from a remote system and a graphical frame displaying the same Emacs process via the local system's monitor, etc. Because of this separation of concerns, Emacs can display roughly similarly on any device more complex than a dumb terminal, including providing typical graphical WIMP elements on sufficiently featureful text terminals - though graphical frames are the preferred mode of display, providing a strict superset of the features of text terminal frames.

Customizability and extensibility

  • User actions can be recorded into macros and replayed to automate complex, repetitive tasks. This is often done on an ad-hoc basis, with each macro discarded after use, although macros can be saved and invoked later.
    • Because of the uniformity of Emacs' features' definition in terms of Emacs Lisp, what counts as a "user action" for the purposes of macro-automation is flexible: macros may include, e.g., keypresses, commands, mouse clicks, other macros, and anything that can be effectuated via these. Macros can thus be recursive, and can be defined and invoked inside of macros.
  • At startup, Emacs executes an Emacs Lisp script named ~/.emacs (recent versions also look for ~/emacs.el, ~/.emacs.d/init.el, and ~/.config/emacs/init.el;[47], as well as similar variations on ~/.config/emacs/early-init.el.[48] Emacs reads early-init.el first if it exists, and it can be used to configure or short-circuit core Emacs features before they load, such as the graphical display system or package manager. It will then execute the first version .emacs or init.el that it finds, ignoring the rest. This personal customization file can be arbitrarily long and complex, but typical content includes:
    • Setting global variables or invoking functions to customize Emacs behaviour, for example (set-default-coding-systems 'utf-8)
    • Key bindings to override standard ones and to add shortcuts for commands that the user finds convenient but don't have a key binding by default. Example: (global-set-key (kbd "C-x C-b") 'ibuffer)
    • Loading, enabling and initializing extensions (Emacs comes with many extensions, but only a few are loaded by default.)
    • Configuring event hooks to run arbitrary code at specific times, for example to automatically recompile source code after saving a buffer (after-save-hook)
    • Executing arbitrary files, usually to split an overly long configuration file into manageable and homogeneous parts (~/.emacs.d/ and ~/elisp/ are traditional locations for these personal scripts)
  • The customize extension allows the user to set configuration properties such as the color scheme interactively, from within Emacs, in a more user-friendly way than by setting variables in .emacs: it offers search, descriptions and help text, multiple choice inputs, reverting to defaults, modification of the running Emacs instance without reloading, and other conveniences similar to the preferences functionality of other programs. The customized values are saved in .emacs (or another designated file) automatically.
  • Themes, affecting the choice of fonts and colours, are defined as Emacs Lisp files and chosen through the customize extension.
  • Modes, which support editing a range of programming languages (e.g., emacs-lisp-mode, c-mode, java-mode, ESS for R) by changing fonts to highlight the code and keybindings modified (forword-function vs. forward-page). Other modes include ones that support editing spreadsheets (dismal) and structured text.

Self-documenting

The first Emacs contained a help library that included documentation for every command, variable and internal function. Because of this, Emacs proponents described the software as self-documenting in that it presents the user with information on its normal features and its current state. Each function includes a documentation string that is displayed to the user on request, a practice that subsequently spread to programming languages including Lisp, Java, Perl, and Python. This help system can take users to the actual code for each function, whether from a built-in library or an added third-party library.

Emacs also has a built-in tutorial. Emacs displays instructions for performing simple editing commands and invoking the tutorial when it is launched with no file to edit. The tutorial is by Stuart Cracraft and Richard Stallman.

Culture

Church of Emacs

The Church of Emacs, formed by Richard Stallman, is a parody religion created for Emacs users.[49] While it refers to vi as the editor of the beast (vi-vi-vi being 6-6-6 in Roman numerals), it does not oppose the use of vi; rather, it calls it proprietary software anathema. ("Using a free version of vi is not a sin but a penance."[50]) The Church of Emacs has its own newsgroup, alt.religion.emacs,[51] that has posts purporting to support this parody religion. Supporters of vi have created an opposing Cult of vi.

Stallman has jokingly referred to himself as St I GNU cius, a saint in the Church of Emacs.[52]

Emacs pinky

There is folklore attributing a repetitive strain injury colloquially called Emacs pinky to Emacs' strong dependence on modifier keys,[53] although there have not been any studies done to show Emacs causes more such problems than other keyboard-heavy computer programs.

Users have addressed this through various approaches. Some users recommend simply using the two Control keys on typical PC keyboards like Shift keys while touch typing to avoid overly straining the left pinky, a proper use of the keyboard will reduce the RSI.[54] Software-side methods include:[55]

  • Customizing the key layout so that the Ctrl key is transposed with the Caps Lock key.[56] Similar techniques include defining the Caps Lock key as an additional Control key or transposing the Control and Meta keys.However, as these keys are still pressed with the same finger, they may still contribute to Emacs pinky.[clarification needed]
  • Software, such as xwrits or the built-in type-break-mode in Emacs, that reminds the user to take regularly scheduled breaks.
  • Using the ErgoEmacs keybindings (with minor mode ergoemacs-mode).[57]
  • Customizing the whole keyboard layout to move statistically frequent Emacs keys to more appropriate places.[58]
  • Packages such as ace-jump-mode[59] or Emacs Lisp extensions that provide similar functionality of tiered navigation, first asking for a character then replacing occurrences of the character with access keys for cursor movement.
  • evil-mode, an advanced Vim emulation layer.
  • god-mode, which provides an approach similar to vim's with a mode for entering Emacs commands without modifier keys.
  • Using customized key layout offered by Spacemacs and Doom Emacs, projects where space bar key is used as the main key for initiating control sequences. These projects also heavily incorporates both evil-mode and the latter god-mode.[60]
  • StickyKeys, which turns key sequences into key combinations.[61]
  • Emacs' built-in viper-mode that allows use of the vi key layout for basic text editing and the Emacs scheme for more advanced features.[62]
  • Giving a dual role to a more-comfortably accessed key such as the space bar so that it functions as a Control key when pressed in combination with other keys. Ergonomic keyboards or keyboards with a greater number of keys adjacent to the space bar, such as Japanese keyboards, allow thumb control of other modifier keys too like Meta or Shift.[63]
  • Using a limited ergonomic subset of keybindings, and accessing other functionality by typing M-x <command-name>. M-x itself can also be rebound.
  • Driving Emacs through voice input.

Hardware solutions include special keyboards such as Kinesis's Contoured Keyboard, which places the modifier keys where they can easily be operated by the thumb, or the Microsoft Natural keyboard, whose large modifier keys are placed symmetrically on both sides of the keyboard and can be pressed with the palm of the hand.[53] Foot pedals can also be used.

The Emacs pinky is a relatively recent development. The Space-cadet keyboard on which Emacs was developed had oversized Control keys that were adjacent to the space bar and were easy to reach with the thumb.[64]

Terminology

The word emacs is sometimes pluralized as emacsen, by phonetic analogy with boxen and VAXen, referring to different varieties of Emacs.[65]

See also

References

  1. ^ "Emacs Release Dates".
  2. ^ a b Zawinski, Jamie (2005-06-21) [1999]. "Emacs Timeline". Retrieved 11 August 2015.
  3. ^ a b Greenberg, Bernard S. (1979). Multics Emacs: The History, Design and Implementation.
  4. ^ a b c "GNU Emacs FAQ".
  5. ^ a b c d Adrienne G. Thompson. . Archived from the original on 2013-10-24. Retrieved 2012-02-26.
  6. ^ "A Tutorial Introduction to GNU Emacs". For an editor to be called "emacs" the main requirement is that it be fully extensible with a real programming language, not just a macro language.
  7. ^ "GNU Emacs Pocket Reference". GNU Emacs is the most popular and widespread of the Emacs family of editors.
  8. ^ "GNU Emacs Manual". FSF. Retrieved 24 November 2012.
  9. ^ "Tramp User Manual". Free Software Foundation. Retrieved 2009-04-04.
  10. ^ "Introducing Elfeed, an Emacs Web Feed Reader".
  11. ^ "Amusements". Finally, if you find yourself frustrated, try describing your problems to the famous psychotherapist Eliza. Just do M-x doctor.
  12. ^ Richard Stallman is often credited as another co-creator, but as Daniel Weinreb wrote, "The original (TECO-based) Emacs was created and designed by Guy L. Steele Jr. and David Moon. After they had it working, and it had become established as the standard text editor at the AI lab, Stallman took over its maintenance." Moon himself responded "All true, so far as I can remember. But in all fairness I have to say that Stallman greatly improved Emacs after he “liberated” it from Guy and me." See Weinreb, Dan (November 11, 2007), , Dan Weinreb's blog: software and innovation, archived from the original on January 1, 2009.
  13. ^ "A history of Emacs". XEmacs Internals Manual. 2006-12-11. Retrieved 2007-08-22.
  14. ^ Allombert, Bill. "Debian Popularity Contest". Editors report. Debian. Retrieved 22 November 2011.
  15. ^ "The 10 oldest, significant open-source programs". ZDNet.
  16. ^ Raymond, Eric S.; Cameron, Debra; Rosenblatt, Bill (1996). Learning GNU Emacs, 2nd Edition. Sebastopol, CA: O'Reilly. pp. 408–409. ISBN 1-56592-152-6.
  17. ^ Williams, Sam (2002). Free as in Freedom: Richard Stallman's Crusade for Free Software. Sebastopol, CA: O'Reilly Media. p. 82. ISBN 0-596-00287-4.
  18. ^ Arthur Samuel (March 1980). "Essential E" (PDF). Retrieved 2020-04-19.
  19. ^ . Archived from the original on 2014-11-26. Retrieved 2014-05-30. "EMACS as such actually started out as a standards project," emails Guy Steele
  20. ^ Stallman, Richard M. (1987). "The EMACS Full-Screen Editor". GARB. No. Maj 1987. Lysator, Linköping University. pp. 8–11. Retrieved 2007-09-14.
  21. ^ Reynolds, Craig (1992-02-10). Wiseman, David G. (ed.). . David G. Wiseman: Stories of Computer Folklore. Archived from the original on January 16, 2003. A cocky novice once said to Stallman: 'I can guess why the editor is called Emacs, but why is the justifier called Bolio?'. Stallman replied forcefully, Names are but names, Emack & Bolio's is the name of a popular ice cream shop in Boston town. Neither of these men had anything to do with the software.' His question answered, yet unanswered, the novice turned to go, but Stallman called to him, 'Neither Emacs nor Bolio had anything to do with the ice cream shop, either.'
  22. ^ a b Stallman, Richard (March 26, 1981). EMACS: The Extensible, Customizable, Self-Documenting, Display Editor (PDF) (Technical report). MIT AI Lab. AI Memo 519a. Retrieved 2011-01-07.
  23. ^ Leigh Klotz (2007-08-29). "email quoted in "Be Careful What You Joke About"". The New York Times. Retrieved 2010-05-01.
  24. ^ "Comment by ZWEI's author Dan Weinreb". I wrote the second Emacs ever: the Lisp machine implementation, whose spec was "do what Stallman's PDP-10 (original) Emacs does", and then progressed from there. There's just a whole LOT of it. It took me and Mike McMahon endless hours to implement so many commands to make ZWEI/Zmacs.
  25. ^ Owen Theodore Anderson (January 1979). "The Design and Implementation of a Display-Oriented Editor Writing System" (PDF). Retrieved 2012-09-09.
  26. ^ Christopher Kelty; Mario Biagioli; Peter Jaszi; Martha Woodmansee (2015). Making and Unmaking Intellectual Property. Computer Corporation of America (CCA) EMACS, written by Steve Zimmerman
  27. ^ "Emacs". December 17, 2017.
  28. ^ "Differences between GNU Emacs and CCA Emacs. Copyyright".
  29. ^ "A History of Emacs".
  30. ^ "emacs-devel msg 00872 (2014-09-29)". In retrospect 24.3 should have been named 25.1 and 24.4 should have been named 26.1. The .N thingy should really be kept only for bug-fix releases and neither of 24.3, 24.4, nor the previously planned 24.5 are bug-fix releases.
  31. ^ Stoll, Clifford (1988). "Stalking the wily hacker". Communications of the ACM. 31 (5): 484–497. doi:10.1145/42411.42412. S2CID 6956966.
  32. ^ "GNU Emacs". Open Hub. Retrieved 2017-11-25.
  33. ^ Raymond, Eric (2014-11-12). "New Git repository is up". Retrieved 2017-11-25.
  34. ^ Stallman, Richard (2008-02-22). "Re: Looking for a new Emacs maintainer or team". gnu.org Mailing List. Retrieved 2017-11-25.
  35. ^ McNamara, Paul (2008-02-25). "Stallman on handing over GNU Emacs, its future and the importance of nomenclature". Network World. Retrieved 2017-11-25.
  36. ^ Chirgwin, Richard (2015-11-05). "Emacs gets new maintainer as Richard Stallman signs off". The Register. Retrieved 2017-11-25.
  37. ^ Raymond, Eric (2014-03-29). "Ugliest…repository…conversion…ever". Retrieved 2017-11-25. twenty-nine years of continuous development by no fewer than 579 people
  38. ^ Stephen J., Turnbull. "XEmacs vs. GNU Emacs". Retrieved 2012-10-02.
  39. ^ "XEmacs is Dead. Long Live XEmacs!".
  40. ^ FrontPage - Meadow Wiki 2012-02-16 at the Wayback Machine
  41. ^ "My Lisp Experiences and the Development of GNU Emacs". There were people in those days, in 1985, who had one-megabyte machines without virtual memory. They wanted to be able to use GNU Emacs. This meant I had to keep the program as small as possible.
  42. ^ "GNU Zile (Zile is Lossy Emacs) - Summary". Modern computers have more than enough resources to start and run a full Emacs in a fraction of a second, and Emacs is probably what you want. Zile is a small, fast, and powerful Emacs clone. It is useful for small footprint installations (e.g. on floppy disk), machines with little memory, or quick editing sessions, especially on remote machines or as a different user, e.g. root.
  43. ^ "Lugaru Software Homepage".
  44. ^ "Cocoa text system".
  45. ^ "Setting up keybindings for the Command Window and Editor". Mathworks Blogs. 2007-05-11. Retrieved 2019-08-18.
  46. ^ Bolsky, Morris I.; Korn, David G. (1989). "Acknowledgements". The KornShell Command and Programming Language. Englewood Cliffs, NJ: Prentice Hall. pp. xii. ISBN 0-13-516972-0.
  47. ^ "Init file".
  48. ^ "Early Init file".
  49. ^ "Saint IGNUcius - Richard Stallman". Retrieved 29 January 2015.
  50. ^ "The unabridged selective transcript of Richard M Stallman's talk at the ANU". Retrieved 29 January 2015.
  51. ^ alt.religion.emacs newsgroup
  52. ^ "Saint IGNUcius - Richard Stallman". www.stallman.org. Retrieved 27 March 2018.
  53. ^ a b "How To Avoid The Emacs Pinky Problem". Xahlee.org. Retrieved 2009-11-08.
  54. ^ "Emacs: Why You Should Not Swap {Caps Lock, Control} Keys". In touch typing, modifiers comes in pairs, such as ⇧ Shift key. The accepted ergonomic way to press modifier combinations is using one hand to press the modifier key and the other to press the letter key. Using 2 hands avoids single-hand straining its muscle.
  55. ^ "EmacsWiki: Repeated Strain Injury". Retrieved 29 January 2015.
  56. ^ "Moving The Ctrl Key". EmacsWiki. Retrieved 2009-11-08.
  57. ^ "ErgoEmacs Homepage". Retrieved 2018-09-01.
  58. ^ "Keymacs layout". GitHub. 15 September 2022.
  59. ^ "EmacsWiki: Ace Jump". Retrieved 29 January 2015.
  60. ^ "Spacemacs". GitHub. Retrieved 2015-04-20.
  61. ^ BayleShanks (2009-10-07). "Sticky Modifiers". EmacsWiki. Retrieved 2009-11-08.
  62. ^ "Viper Mode". EmacsWiki. Retrieved 2009-11-08.
  63. ^ "At Home Modifier by Evdev". Retrieved 2015-04-14.
  64. ^ "Why Emacs's Keyboard Shortcuts are Painful".
  65. ^ "VAXen". Catb.org. Retrieved 2009-11-08.

Bibliography

  • Ciccarelli, Eugene (1978). An Introduction to the Emacs Editor. Cambridge, Massachusetts: MIT Artificial Intelligence Laboratory. AIM-447. PDF
  • Stallman, Richard M. (1981) [1979]. EMACS: The Extensible, Customizable, Self-Documenting Display Editor. Cambridge Massachusetts: MIT Artificial Intelligence Laboratory. AIM-519A. PDF HTML
  • Stallman, Richard M. (2002). GNU Emacs Manual (15th ed.). GNU Press. ISBN 1-882114-85-X.
  • Stallman, Richard M. (2002). "My Lisp Experiences and the Development of GNU Emacs". Retrieved 2007-02-01.
  • Chassel, Robert J. (2004). An Introduction to Programming in Emacs Lisp. GNU Press. ISBN 1-882114-56-6.
  • Glickstein, Bob (April 1997). Writing GNU Emacs Extensions. O'Reilly & Associates. ISBN 1-56592-261-1.
  • Cameron, Debra; Elliott, James; Loy, Marc; Raymond, Eric; Rosenblatt, Bill (December 2004). Learning GNU Emacs, 3rd Edition. O'Reilly & Associates. ISBN 0-596-00648-9.
  • Finseth, Craig A. (1991). The Craft of Text Editing -or- Emacs for the Modern World. Springer-Verlag & Co. ISBN 978-1-4116-8297-9.
  • Thompson, Adrienne G. (2009). "MACSimizing TECO". Retrieved 2012-02-26.

External links

  • Official website
  • List of Emacs implementations
  • Architectural overview

emacs, confused, with, emac, lisp, this, article, about, class, text, editors, most, popular, current, implementation, originally, named, emacs, acronym, editor, macros, family, text, editors, that, characterized, their, extensibility, manual, most, widely, us. Not to be confused with eMac or Emacs Lisp This article is about the class of text editors For the most popular current implementation see GNU Emacs Emacs ˈ iː m ae k s originally named EMACS an acronym for Editor MACroS 3 4 5 is a family of text editors that are characterized by their extensibility 6 The manual for the most widely used variant 7 GNU Emacs describes it as the extensible customizable self documenting real time display editor 8 Development of the first Emacs began in the mid 1970s and work on its direct descendant GNU Emacs continues actively the latest version is 28 2 released in September 2022 EmacsOrg mode Magit and Dired buffers in GNU EmacsOriginal author s David A Moon Guy L Steele Jr Developer s Various free libre software developers including volunteers and commercial developersInitial release1976 47 years ago 1976 1 2 Written inLisp COperating systemCross platformTypeText editorWebsitewww wbr gnu wbr org wbr software wbr emacs wbr Emacs has over 10 000 built in commands and its user interface allows the user to combine these commands into macros to automate work Implementations of Emacs typically feature a dialect of the Lisp programming language allowing users and developers to write new commands and applications for the editor Extensions have been written to among other things manage files remote access 9 e mail outlines multimedia git integration and RSS feeds 10 as well as implementations of ELIZA Pong Conway s Life Snake Dunnet and Tetris 11 The original EMACS was written in 1976 by David A Moon and Guy L Steele Jr as a set of Editor MACroS for the TECO editor 2 3 4 5 12 It was inspired by the ideas of the TECO macro editors TECMAC and TMACS 13 The most popular and most ported version of Emacs is GNU Emacs which was created by Richard Stallman for the GNU Project 14 XEmacs is a variant that branched from GNU Emacs in 1991 GNU Emacs and XEmacs use similar Lisp dialects and are for the most part compatible with each other XEmacs development is inactive Emacs is along with vi one of the two main contenders in the traditional editor wars of Unix culture Emacs is among the oldest free and open source projects still under development 15 Contents 1 History 2 Implementations 2 1 Early implementations 2 2 GNU Emacs 2 3 XEmacs 2 4 Other forks of GNU Emacs 2 5 Various Emacs editors 2 6 Editors with Emacs emulation 3 Features 3 1 General architecture 3 1 1 Interactive data 3 1 2 Command language 3 1 3 Dynamic display 3 2 Customizability and extensibility 3 3 Self documenting 4 Culture 4 1 Church of Emacs 4 2 Emacs pinky 4 3 Terminology 5 See also 6 References 7 Bibliography 8 External linksHistory Edit Emacs was started by Guy L Steele Jr as a project to unify the many divergent TECO command sets and key bindings at MIT 4 David A Moon Emacs interface was influenced by the design of the space cadet keyboard which sought to enable users to type as many different kinds of input as possible 16 Emacs development began during the 1970s at the MIT AI Lab whose PDP 6 and PDP 10 computers used the Incompatible Timesharing System ITS operating system that featured a default line editor known as Tape Editor and Corrector TECO Unlike most modern text editors TECO used separate modes in which the user would either add text edit existing text or display the document One could not place characters directly into a document by typing them into TECO but would instead enter a character i in the TECO command language telling it to switch to input mode enter the required characters during which time the edited text was not displayed on the screen and finally enter a character lt esc gt to switch the editor back to command mode A similar technique was used to allow overtyping This behavior is similar to that of the program ed By the 1970s TECO was already an old program initially released in 1962 Richard Stallman visited the Stanford AI Lab in 1976 17 and saw the lab s E editor written by Fred Wright 18 He was impressed by the editor s intuitive WYSIWYG What You See Is What You Get behavior which has since become the default behavior of most modern text editors He returned to MIT where Carl Mikkelsen a hacker at the AI Lab had added to TECO a combined display editing mode called Control R that allowed the screen display to be updated each time the user entered a keystroke Stallman reimplemented this mode to run efficiently and then added a macro feature to the TECO display editing mode that allowed the user to redefine any keystroke to run a TECO program 5 E had another feature that TECO lacked random access editing TECO was a page sequential editor that was designed for editing paper tape on the PDP 1 at a time when computer memory was generally small due to cost and it was a feature of TECO that allowed editing on only one page at a time sequentially in the order of the pages in the file Instead of adopting E s approach of structuring the file for page random access on disk Stallman modified TECO to handle large buffers more efficiently and changed its file management method to read edit and write the entire file as a single buffer Almost all modern editors use this approach The new version of TECO quickly became popular at the AI Lab and soon accumulated a large collection of custom macros whose names often ended in MAC or MACS which stood for macro Two years later Guy Steele took on the project of unifying the diverse macros into a single set 19 Steele and Stallman s finished implementation included facilities for extending and documenting the new macro set 5 The resulting system was called EMACS which stood for Editing MACroS or alternatively E with MACroS Stallman picked the name Emacs because lt E gt was not in use as an abbreviation on ITS at the time 20 An apocryphal hacker koan alleges that the program was named after Emack amp Bolio s a popular Boston ice cream store 21 The first operational EMACS system existed in late 1976 22 Stallman saw a problem in too much customization and de facto forking and set certain conditions for usage citation needed He later wrote 22 EMACS was distributed on a basis of communal sharing which means all improvements must be given back to me to be incorporated and distributed The original Emacs like TECO ran only on the PDP 10 running ITS Its behavior was sufficiently different from that of TECO that it could be considered a text editor in its own right and it quickly became the standard editing program on ITS Mike McMahon ported Emacs from ITS to the TENEX and TOPS 20 operating systems Other contributors to early versions of Emacs include Kent Pitman Earl Killian and Eugene Ciccarelli By 1979 Emacs was the main editor used in MIT s AI lab and its Laboratory for Computer Science 23 Implementations EditEarly implementations Edit Zmacs an Emacs for Lisp machines an evolution of EINE and ZWEI James Gosling wrote an Emacs like editor to run on Unix Gosling Emacs in 1981 In the following years programmers wrote a variety of Emacs like editors for other computer systems These included EINE EINE Is Not EMACS and ZWEI 24 ZWEI Was EINE Initially which were written for the Lisp machine by Mike McMahon and Daniel Weinreb and Sine Sine Is Not Eine 25 which was written by Owen Theodore Anderson Weinreb s EINE was the first Emacs written in Lisp In 1978 Bernard Greenberg wrote Multics Emacs almost entirely in Multics Lisp at Honeywell s Cambridge Information Systems Lab Multics Emacs was later maintained by Richard Soley who went on to develop the NILE Emacs like editor for the NIL Project and by Barry Margolin Many versions of Emacs including GNU Emacs would later adopt Lisp as an extension language James Gosling who would later invent NeWS and the Java programming language wrote Gosling Emacs in 1981 The first Emacs like editor to run on Unix citation needed Gosling Emacs was written in C and used Mocklisp a language with Lisp like syntax as an extension language Early Ads for Computer Corporation of America s CCA EMACS Steve Zimmerman 26 appeared in 1984 27 1985 comparisons to GNU Emacs when it came out mentioned free vs 2 400 28 irrelevant citation GNU Emacs Edit Main article GNU Emacs GNU Emacs running in a text console GNU Emacs running on Microsoft Windows Richard Stallman began work on GNU Emacs in 1984 to produce a free software alternative to the proprietary Gosling Emacs GNU Emacs was initially based on Gosling Emacs but Stallman s replacement of its Mocklisp interpreter with a true Lisp interpreter required that nearly all of its code be rewritten This became the first program released by the nascent GNU Project GNU Emacs is written in C and provides Emacs Lisp also implemented in C as an extension language Version 13 the first public release was made on March 20 1985 The first widely distributed version of GNU Emacs was version 15 34 released later in 1985 Early versions of GNU Emacs were numbered as 1 x x with the initial digit denoting the version of the C core The 1 was dropped after version 1 12 as it was thought that the major number would never change and thus the numbering skipped from 1 to 13 29 In September 2014 it was announced on the GNU emacs devel mailing list that GNU Emacs would adopt a rapid release strategy and version numbers would increment more quickly in the future 30 GNU Emacs offered more features than Gosling Emacs in particular a full featured Lisp as its extension language and soon replaced Gosling Emacs as the de facto Unix Emacs editor Markus Hess exploited a security flaw in GNU Emacs email subsystem in his 1986 cracking spree in which he gained superuser access to Unix computers 31 Most of GNU Emacs functionality is implemented through a scripting language called Emacs Lisp Because about 70 of GNU Emacs is written in the Emacs Lisp extension language 32 one only needs to port the C core which implements the Emacs Lisp interpreter This makes porting Emacs to a new platform considerably less difficult than porting an equivalent project consisting of native code only GNU Emacs development was relatively closed until 1999 and was used as an example of the Cathedral development style in The Cathedral and the Bazaar The project has since adopted a public development mailing list and anonymous CVS access Development took place in a single CVS trunk until 2008 and was then switched to the Bazaar DVCS On November 11 2014 development was moved to Git 33 Richard Stallman has remained the principal maintainer of GNU Emacs but he has stepped back from the role at times Stefan Monnier and Chong Yidong were maintainers from 2008 to 2015 34 35 John Wiegley was named maintainer in 2015 after a meeting with Stallman at MIT 36 As of early 2014 GNU Emacs has had 579 individual committers throughout its history 37 XEmacs Edit Main article XEmacs XEmacs 21 5 on Linux Lucid Emacs based on an early alpha version of GNU Emacs 19 was developed beginning in 1991 by Jamie Zawinski and others at Lucid Inc One of the best known early forks in free software development occurred when the codebases of the two Emacs versions diverged and the separate development teams ceased efforts to merge them back into a single program 38 Lucid Emacs has since been renamed XEmacs Its development is currently inactive with the most recent stable version 21 4 22 released in January 2009 while a beta was released in 2013 while GNU Emacs has implemented many formerly XEmacs only features 39 better source needed Other forks of GNU Emacs Edit Other notable forks include Aquamacs based on GNU Emacs Aquamacs 3 2 is based on GNU Emacs version 24 and Aquamacs 3 3 is based on GNU Emacs version 25 which focuses on integrating with the Apple Macintosh user interface Meadow a Japanese version for Microsoft Windows 40 Various Emacs editors Edit uEmacs Pk 4 0 15 on Linux The mg tiny Emacs like editor in OpenBSD 5 3 Editing Ruby source code JOVE running in a Debian box In the past projects aimed at producing small versions of Emacs proliferated GNU Emacs was initially targeted at computers with a 32 bit flat address space and at least 1 MiB of RAM 41 Such computers were high end workstations and minicomputers in the 1980s and this left a need for smaller reimplementations that would run on common personal computer hardware Today s computers have more than enough power and capacity to eliminate these restrictions but small clones have more recently been designed to fit on software installation disks or for use on less capable hardware 42 Other projects aim to implement Emacs in a different dialect of Lisp or a different programming language altogether Although not all are still actively maintained these clones include MicroEMACS which was originally written by Dave Conroy and further developed by Daniel Lawrence and which exists in many variations mg originally called MicroGNUEmacs and later mg2a a public domain offshoot of MicroEMACS intended to more closely resemble GNU Emacs Now installed by default on OpenBSD JOVE Jonathan s Own Version of Emacs Jonathan Payne s non programmable Emacs implementation for UNIX like systems MINCE MINCE Is Not Complete Emacs a version for CP M and later DOS from Mark of the Unicorn MINCE evolved into Final Word which eventually became the Borland Sprint word processor Perfect Writer a CP M implementation derived from MINCE that was included circa 1982 as the default word processor with the very earliest releases of the Kaypro II and Kaypro IV It was later provided with the Kaypro 10 as an alternative to WordStar Freemacs a DOS version that uses an extension language based on text macro expansion and fits within the original 64 KiB flat memory limit Zmacs for the MIT Lisp Machine and its descendants implemented in ZetaLisp Epsilon 43 an Emacs clone by Lugaru Software Versions for DOS Windows Linux FreeBSD Mac OS X and O S 2 are bundled in the release It uses a non Lisp extension language with C syntax and used a very early concurrent command shell buffer implementation under the single tasking MS DOS PceEmacs is the Emacs based editor for SWI Prolog Hemlock originally written in Spice Lisp then Common Lisp A part of CMU Common Lisp Influenced by Zmacs Later forked by Lucid Common Lisp as Helix LispWorks and Clozure CL projects There is also a Portable Hemlock project which aims to provide a Hemlock which runs on several Common Lisp implementations edwin an Emacs like text editor included with MIT GNU Scheme Editors with Emacs emulation Edit The Cocoa text system uses some of the same terminology and understands many Emacs navigation bindings This is possible because the native UI uses the Command key equivalent to Super instead of the Control key 44 Eclipse IDE provides a set of Emacs keybindings Epsilon text editor Defaults to Emacs emulation and supports a vi mode GNOME Builder has an emulation mode for Emacs GNU Readline is a line editor that understands the standard Emacs navigation keybindings It also has a vi emulation mode IntelliJ IDEA provides a set of Emacs keybindings JED has an emulation mode for Emacs Joe s Own Editor emulates Emacs keybindings when invoked as jmacs MATLAB provides Emacs keybindings for its editor 45 KornShell has an Emacs line editing mode that predates Gnu Readline 46 Visual Studio Code provides an extension to emulate Emacs keybindings Oracle SQL Developer can save and load alternative keyboard shortcut layouts One of the built in layouts provides Emacs like keybindings including using different commands to achieve closer behavior Features EditEmacs is primarily a text editor and is designed for manipulating pieces of text although it is capable of formatting and printing documents like a word processor by interfacing with external programs such as LaTeX Ghostscript or a web browser Emacs provides commands to manipulate and differentially display semantic units of text such as words sentences paragraphs and source code constructs such as functions It also features keyboard macros for performing user defined batches of editing commands GNU Emacs is a real time display editor as its edits are displayed onscreen as they occur This is standard behavior for modern text editors but EMACS was among the earliest to implement this The alternative is having to issue a distinct command to display text e g after modifying it This is done in line editors such as ed unix ED CP M and Edlin MS DOS General architecture Edit Almost all of the functionality in Emacs including basic editing operations such as the insertion of characters into a file is achieved through functions written in a dialect of the Lisp programming language The dialect used in GNU Emacs is known as Emacs Lisp Elisp and was developed expressly to port Emacs to GNU and Unix The Emacs Lisp layer sits atop a stable core of basic services and platform abstraction written in the C programming language which enables GNU Emacs to be ported to a wide variety of operating systems and architectures without modifying the implementation semantics of the Lisp system where most of the editor lives In this Lisp environment variables and functions can be modified with no need to rebuild or restart Emacs with even newly redefined versions of core editor features being asynchronously compiled and loaded into the live environment to replace existing definitions Modern GNU Emacs features both bytecode and native code compilation for Emacs Lisp All configuration is stored in variables classes and data structures and changed by simply updating these live The use of a Lisp dialect in this case is a key advantage as Lisp syntax consists of so called symbolic expressions or sexprs which can act as both evaluatable code expressions and as a data serialisation format akin to but simpler and more general than widely known ones such as XML JSON and YAML In this way there is little difference in practice between customising existing features and writing new ones both of which are accomplished in the same basic way The goal of Emacs open design is to transparently expose Emacs internals to the Emacs user during normal use in the same way that they would be exposed to the Emacs developer working on the git tree and to collapse as much as possible of the distinction between using Emacs and programming Emacs while still maintaining a stable practical environment for novice users Interactive data Edit The main text editing data structure is the buffer a memory region containing data usually text with associated attributes The most important of these are The point the editing cursor The mark a settable location which along with the point enables selection of The region a conceptually contiguous collection of text to which editing commands will be applied The name and inode of the file the buffer is visiting if any The default directory where any OS level commands will be executed from by default The buffer s modes including a major mode possibly several minor modes The buffer encoding the method by which Emacs represents buffer data to the user and a variety of buffer local variables and Emacs Lisp state Modes in particular are an important concept in Emacs providing a mechanism to disaggregate Emacs functionality into sets of behaviours and keybinds relevant to specific buffers data Major modes provide a general package of functions and commands relevant to a buffer s data and the way users might be interacting with it e g editing source code in a specific language editing hex viewing the filesystem interacting with git etc and minor modes define subsidiary collections of functionality applicable across many major modes such as auto save mode Minor modes can be toggled on or off both locally to each buffer as well as globally across all buffers while major modes can only be toggled per buffer Any other data relevant to a buffer but not bundled into a mode can be handled by simply focussing that buffer and live modifying the relevant data directly Any interaction with the editor like key presses or clicking a mouse button is realized by evaluating Emacs Lisp code typically a command which is a function explicitly designed for interactive use Keys can be arbitrarily redefined and commands can also be accessed by name some commands evaluate arbitrary Emacs Lisp code provided by the user in various ways e g a family of eval region buffer and expression type commands Even the simplest user inputs such a printable characters are effectuated as Emacs Lisp functions such as the self insert command bound to most keyboard keys in a typical text editing buffer by default which parameterises itself with the locale defined character associated with the key used to call it For example pressing the f key in a buffer that accepts text input evaluates the code span class p span span class nf self insert command span span class mi 1 span span class sc f span span class p span which inserts one copy of the character constant f at point The 1 in this case is determined by what Emacs terms the universal argument all Emacs command code accepts a numeric value which in its simplest usage indicates repetition of an action but in more complex cases where repetition doesn t make sense can yield other behaviours These arguments may be supplied via command prefices such as Control u 7 f or more compactly Meta 7 f which expands to span class p span span class nf self insert command span span class mi 7 span span class sc f span span class p span When no prefix is supplied the universal argument is 1 every command implicitly runs once but may be called multiply or in a different way when supplied with such a prefix Such arguments may be also be non positive where it makes sense for them to be so it is up to the function accepting the argument to determine according to its own semantics what a given number means to it One common usage is for functions to perform actions in reverse simply by checking the sign of the univeral argument such as a sort command which sorts in obverse by default and in reverse when called with a negative argument or undo redo which are simply negatives of each other stepping forward and backward through a recursive history of diffs Command language Edit Because of its relatively large vocabulary of commands Emacs features a long established command language to concisely express the keystrokes necessary to perform an action This command language recognises the following shift and modifier keys Ctrl Alt Shift Meta Super and Hyper Not all of these may be present on an IBM style keyboard though they can usually be configured as desired These are represented in command language as the respective prefices C A S M s and H Keys whose names are only printable with more than one character are enclosed in angle brackets Thus a keyboard shortcut such as Ctrl Alt Shift F9 check dependent formulas and calculate all cells in all open workbooks in Excel would be rendered in Emacs command language as C A S lt f9 gt while an Emacs command like Meta s f Ctrl Meta s incremental file search by filename only regexp would be expressed as M s f C M s Command language is also used to express the actions needed to invoke commands with no default keybinding for example the command scratch buffer which initialises a buffer in memory for temporary text storage and manipulation when invoked by name by the user will be reported back as M x scra lt return gt the shortest sequence of keystrokes which uniquely lexicate it Dynamic display Edit Because Emacs predates modern standard terminology for graphical user interfaces it uses somewhat divergent names for familiar interface elements Buffers the data that Emacs users interact with are displayed to the user inside windows which are tiled portions of the terminal screen or the GUI window which Emacs refers to as frames in modern terminology an Emacs frame would be a window and an Emacs window would be a split Depending on configuration windows can include their own scroll bars line numbers sometimes a header line typically to ease navigation and a mode line at the bottom usually displaying buffer name the active modes and point position of the buffer among others The bottom of every frame is used for output messages then called echo area and text input for commands then called minibuffer In general Emacs display elements windows frames etc are not tied to any specific data or process Buffers are not associated with windows and multiple windows can be opened onto the same buffer for example to see different parts of a long text side by side without scrolling and multiple buffers can share the same text for example to take advantage of different major modes in a mixed language file Similarly Emacs instances are not associated with particular frames and multiple frames can be opened displaying a single running Emacs process e g a frame per screen in a multi monitor setup or a terminal frame connected via ssh from a remote system and a graphical frame displaying the same Emacs process via the local system s monitor etc Because of this separation of concerns Emacs can display roughly similarly on any device more complex than a dumb terminal including providing typical graphical WIMP elements on sufficiently featureful text terminals though graphical frames are the preferred mode of display providing a strict superset of the features of text terminal frames Customizability and extensibility Edit User actions can be recorded into macros and replayed to automate complex repetitive tasks This is often done on an ad hoc basis with each macro discarded after use although macros can be saved and invoked later Because of the uniformity of Emacs features definition in terms of Emacs Lisp what counts as a user action for the purposes of macro automation is flexible macros may include e g keypresses commands mouse clicks other macros and anything that can be effectuated via these Macros can thus be recursive and can be defined and invoked inside of macros At startup Emacs executes an Emacs Lisp script named emacs recent versions also look for emacs el emacs d init el and config emacs init el 47 as well as similar variations on config emacs early init el 48 Emacs reads early init el first if it exists and it can be used to configure or short circuit core Emacs features before they load such as the graphical display system or package manager It will then execute the first version emacs or init el that it finds ignoring the rest This personal customization file can be arbitrarily long and complex but typical content includes Setting global variables or invoking functions to customize Emacs behaviour for example set default coding systems utf 8 Key bindings to override standard ones and to add shortcuts for commands that the user finds convenient but don t have a key binding by default Example span class p span span class nv global set key span span class p span span class nv kbd span span class s C x C b span span class p span span class ss ibuffer span span class p span Loading enabling and initializing extensions Emacs comes with many extensions but only a few are loaded by default Configuring event hooks to run arbitrary code at specific times for example to automatically recompile source code after saving a buffer after save hook Executing arbitrary files usually to split an overly long configuration file into manageable and homogeneous parts emacs d and elisp are traditional locations for these personal scripts The customize extension allows the user to set configuration properties such as the color scheme interactively from within Emacs in a more user friendly way than by setting variables in emacs it offers search descriptions and help text multiple choice inputs reverting to defaults modification of the running Emacs instance without reloading and other conveniences similar to the preferences functionality of other programs The customized values are saved in emacs or another designated file automatically Themes affecting the choice of fonts and colours are defined as Emacs Lisp files and chosen through the customize extension Modes which support editing a range of programming languages e g emacs lisp mode c mode java mode ESS for R by changing fonts to highlight the code and keybindings modified forword function vs forward page Other modes include ones that support editing spreadsheets dismal and structured text Self documenting Edit The first Emacs contained a help library that included documentation for every command variable and internal function Because of this Emacs proponents described the software as self documenting in that it presents the user with information on its normal features and its current state Each function includes a documentation string that is displayed to the user on request a practice that subsequently spread to programming languages including Lisp Java Perl and Python This help system can take users to the actual code for each function whether from a built in library or an added third party library Emacs also has a built in tutorial Emacs displays instructions for performing simple editing commands and invoking the tutorial when it is launched with no file to edit The tutorial is by Stuart Cracraft and Richard Stallman Culture EditChurch of Emacs Edit Main article Editor warThe Church of Emacs formed by Richard Stallman is a parody religion created for Emacs users 49 While it refers to vi as the editor of the beast vi vi vi being 6 6 6 in Roman numerals it does not oppose the use of vi rather it calls it proprietary software anathema Using a free version of vi is not a sin but a penance 50 The Church of Emacs has its own newsgroup alt religion emacs 51 that has posts purporting to support this parody religion Supporters of vi have created an opposing Cult of vi Stallman has jokingly referred to himself as St I GNU cius a saint in the Church of Emacs 52 Emacs pinky Edit There is folklore attributing a repetitive strain injury colloquially called Emacs pinky to Emacs strong dependence on modifier keys 53 although there have not been any studies done to show Emacs causes more such problems than other keyboard heavy computer programs Users have addressed this through various approaches Some users recommend simply using the two Control keys on typical PC keyboards like Shift keys while touch typing to avoid overly straining the left pinky a proper use of the keyboard will reduce the RSI 54 Software side methods include 55 Customizing the key layout so that the Ctrl key is transposed with the Caps Lock key 56 Similar techniques include defining the Caps Lock key as an additional Control key or transposing the Control and Meta keys However as these keys are still pressed with the same finger they may still contribute to Emacs pinky clarification needed Software such as xwrits or the built in type break mode in Emacs that reminds the user to take regularly scheduled breaks Using the ErgoEmacs keybindings with minor mode ergoemacs mode 57 Customizing the whole keyboard layout to move statistically frequent Emacs keys to more appropriate places 58 Packages such as ace jump mode 59 or Emacs Lisp extensions that provide similar functionality of tiered navigation first asking for a character then replacing occurrences of the character with access keys for cursor movement evil mode an advanced Vim emulation layer god mode which provides an approach similar to vim s with a mode for entering Emacs commands without modifier keys Using customized key layout offered by Spacemacs and Doom Emacs projects where space bar key is used as the main key for initiating control sequences These projects also heavily incorporates both evil mode and the latter god mode 60 StickyKeys which turns key sequences into key combinations 61 Emacs built in viper mode that allows use of the vi key layout for basic text editing and the Emacs scheme for more advanced features 62 Giving a dual role to a more comfortably accessed key such as the space bar so that it functions as a Control key when pressed in combination with other keys Ergonomic keyboards or keyboards with a greater number of keys adjacent to the space bar such as Japanese keyboards allow thumb control of other modifier keys too like Meta or Shift 63 Using a limited ergonomic subset of keybindings and accessing other functionality by typing M x lt command name gt M x itself can also be rebound Driving Emacs through voice input Hardware solutions include special keyboards such as Kinesis s Contoured Keyboard which places the modifier keys where they can easily be operated by the thumb or the Microsoft Natural keyboard whose large modifier keys are placed symmetrically on both sides of the keyboard and can be pressed with the palm of the hand 53 Foot pedals can also be used The Emacs pinky is a relatively recent development The Space cadet keyboard on which Emacs was developed had oversized Control keys that were adjacent to the space bar and were easy to reach with the thumb 64 Terminology Edit The word emacs is sometimes pluralized as emacsen by phonetic analogy with boxen and VAXen referring to different varieties of Emacs 65 See also Edit Free and open source software portalComparison of text editors Conkeror GNU TeXmacs List of text editors List of Unix commands Integrated development environmentReferences Edit Emacs Release Dates a b Zawinski Jamie 2005 06 21 1999 Emacs Timeline Retrieved 11 August 2015 a b Greenberg Bernard S 1979 Multics Emacs The History Design and Implementation a b c GNU Emacs FAQ a b c d Adrienne G Thompson MACSimizing TECO Archived from the original on 2013 10 24 Retrieved 2012 02 26 A Tutorial Introduction to GNU Emacs For an editor to be called emacs the main requirement is that it be fully extensible with a real programming language not just a macro language GNU Emacs Pocket Reference GNU Emacs is the most popular and widespread of the Emacs family of editors GNU Emacs Manual FSF Retrieved 24 November 2012 Tramp User Manual Free Software Foundation Retrieved 2009 04 04 Introducing Elfeed an Emacs Web Feed Reader Amusements Finally if you find yourself frustrated try describing your problems to the famous psychotherapist Eliza Just do M x doctor Richard Stallman is often credited as another co creator but as Daniel Weinreb wrote The original TECO based Emacs was created and designed by Guy L Steele Jr and David Moon After they had it working and it had become established as the standard text editor at the AI lab Stallman took over its maintenance Moon himself responded All true so far as I can remember But in all fairness I have to say that Stallman greatly improved Emacs after he liberated it from Guy and me See Weinreb Dan November 11 2007 Rebuttal to Stallman s Story About The Formation of Symbolics and LMI Dan Weinreb s blog software and innovation archived from the original on January 1 2009 A history of Emacs XEmacs Internals Manual 2006 12 11 Retrieved 2007 08 22 Allombert Bill Debian Popularity Contest Editors report Debian Retrieved 22 November 2011 The 10 oldest significant open source programs ZDNet Raymond Eric S Cameron Debra Rosenblatt Bill 1996 Learning GNU Emacs 2nd Edition Sebastopol CA O Reilly pp 408 409 ISBN 1 56592 152 6 Williams Sam 2002 Free as in Freedom Richard Stallman s Crusade for Free Software Sebastopol CA O Reilly Media p 82 ISBN 0 596 00287 4 Arthur Samuel March 1980 Essential E PDF Retrieved 2020 04 19 EMACS vs vi The endless geek holy war Archived from the original on 2014 11 26 Retrieved 2014 05 30 EMACS as such actually started out as a standards project emails Guy Steele Stallman Richard M 1987 The EMACS Full Screen Editor GARB No Maj 1987 Lysator Linkoping University pp 8 11 Retrieved 2007 09 14 Reynolds Craig 1992 02 10 Wiseman David G ed The Emac Bolio Name Koan David G Wiseman Stories of Computer Folklore Archived from the original on January 16 2003 A cocky novice once said to Stallman I can guess why the editor is called Emacs but why is the justifier called Bolio Stallman replied forcefully Names are but names Emack amp Bolio s is the name of a popular ice cream shop in Boston town Neither of these men had anything to do with the software His question answered yet unanswered the novice turned to go but Stallman called to him Neither Emacs nor Bolio had anything to do with the ice cream shop either a b Stallman Richard March 26 1981 EMACS The Extensible Customizable Self Documenting Display Editor PDF Technical report MIT AI Lab AI Memo 519a Retrieved 2011 01 07 Leigh Klotz 2007 08 29 email quoted in Be Careful What You Joke About The New York Times Retrieved 2010 05 01 Comment by ZWEI s author Dan Weinreb I wrote the second Emacs ever the Lisp machine implementation whose spec was do what Stallman s PDP 10 original Emacs does and then progressed from there There s just a whole LOT of it It took me and Mike McMahon endless hours to implement so many commands to make ZWEI Zmacs Owen Theodore Anderson January 1979 The Design and Implementation of a Display Oriented Editor Writing System PDF Retrieved 2012 09 09 Christopher Kelty Mario Biagioli Peter Jaszi Martha Woodmansee 2015 Making and Unmaking Intellectual Property Computer Corporation of America CCA EMACS written by Steve Zimmerman Emacs December 17 2017 Differences between GNU Emacs and CCA Emacs Copyyright A History of Emacs emacs devel msg 00872 2014 09 29 In retrospect 24 3 should have been named 25 1 and 24 4 should have been named 26 1 The N thingy should really be kept only for bug fix releases and neither of 24 3 24 4 nor the previously planned 24 5 are bug fix releases Stoll Clifford 1988 Stalking the wily hacker Communications of the ACM 31 5 484 497 doi 10 1145 42411 42412 S2CID 6956966 GNU Emacs Open Hub Retrieved 2017 11 25 Raymond Eric 2014 11 12 New Git repository is up Retrieved 2017 11 25 Stallman Richard 2008 02 22 Re Looking for a new Emacs maintainer or team gnu org Mailing List Retrieved 2017 11 25 McNamara Paul 2008 02 25 Stallman on handing over GNU Emacs its future and the importance of nomenclature Network World Retrieved 2017 11 25 Chirgwin Richard 2015 11 05 Emacs gets new maintainer as Richard Stallman signs off The Register Retrieved 2017 11 25 Raymond Eric 2014 03 29 Ugliest repository conversion ever Retrieved 2017 11 25 twenty nine years of continuous development by no fewer than 579 people Stephen J Turnbull XEmacs vs GNU Emacs Retrieved 2012 10 02 XEmacs is Dead Long Live XEmacs FrontPage Meadow Wiki Archived 2012 02 16 at the Wayback Machine My Lisp Experiences and the Development of GNU Emacs There were people in those days in 1985 who had one megabyte machines without virtual memory They wanted to be able to use GNU Emacs This meant I had to keep the program as small as possible GNU Zile Zile is Lossy Emacs Summary Modern computers have more than enough resources to start and run a full Emacs in a fraction of a second and Emacs is probably what you want Zile is a small fast and powerful Emacs clone It is useful for small footprint installations e g on floppy disk machines with little memory or quick editing sessions especially on remote machines or as a different user e g root Lugaru Software Homepage Cocoa text system Setting up keybindings for the Command Window and Editor Mathworks Blogs 2007 05 11 Retrieved 2019 08 18 Bolsky Morris I Korn David G 1989 Acknowledgements The KornShell Command and Programming Language Englewood Cliffs NJ Prentice Hall pp xii ISBN 0 13 516972 0 Init file Early Init file Saint IGNUcius Richard Stallman Retrieved 29 January 2015 The unabridged selective transcript of Richard M Stallman s talk at the ANU Retrieved 29 January 2015 alt religion emacs newsgroup Saint IGNUcius Richard Stallman www stallman org Retrieved 27 March 2018 a b How To Avoid The Emacs Pinky Problem Xahlee org Retrieved 2009 11 08 Emacs Why You Should Not Swap Caps Lock Control Keys In touch typing modifiers comes in pairs such as Shift key The accepted ergonomic way to press modifier combinations is using one hand to press the modifier key and the other to press the letter key Using 2 hands avoids single hand straining its muscle EmacsWiki Repeated Strain Injury Retrieved 29 January 2015 Moving The Ctrl Key EmacsWiki Retrieved 2009 11 08 ErgoEmacs Homepage Retrieved 2018 09 01 Keymacs layout GitHub 15 September 2022 EmacsWiki Ace Jump Retrieved 29 January 2015 Spacemacs GitHub Retrieved 2015 04 20 BayleShanks 2009 10 07 Sticky Modifiers EmacsWiki Retrieved 2009 11 08 Viper Mode EmacsWiki Retrieved 2009 11 08 At Home Modifier by Evdev Retrieved 2015 04 14 Why Emacs s Keyboard Shortcuts are Painful VAXen Catb org Retrieved 2009 11 08 Bibliography EditCiccarelli Eugene 1978 An Introduction to the Emacs Editor Cambridge Massachusetts MIT Artificial Intelligence Laboratory AIM 447 PDF Stallman Richard M 1981 1979 EMACS The Extensible Customizable Self Documenting Display Editor Cambridge Massachusetts MIT Artificial Intelligence Laboratory AIM 519A PDF HTML Stallman Richard M 2002 GNU Emacs Manual 15th ed GNU Press ISBN 1 882114 85 X Stallman Richard M 2002 My Lisp Experiences and the Development of GNU Emacs Retrieved 2007 02 01 Chassel Robert J 2004 An Introduction to Programming in Emacs Lisp GNU Press ISBN 1 882114 56 6 Glickstein Bob April 1997 Writing GNU Emacs Extensions O Reilly amp Associates ISBN 1 56592 261 1 Cameron Debra Elliott James Loy Marc Raymond Eric Rosenblatt Bill December 2004 Learning GNU Emacs 3rd Edition O Reilly amp Associates ISBN 0 596 00648 9 Finseth Craig A 1991 The Craft of Text Editing or Emacs for the Modern World Springer Verlag amp Co ISBN 978 1 4116 8297 9 Thompson Adrienne G 2009 MACSimizing TECO Retrieved 2012 02 26 External links Edit Wikiquote has quotations related to Emacs Wikimedia Commons has media related to Emacs Wikibooks has more on the topic of Emacs Official website List of Emacs implementations Architectural overview Retrieved from https en wikipedia org w index php title Emacs amp oldid 1135640116, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.