Coder Social home page Coder Social logo

vtypal / mg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from troglobit/mg

0.0 1.0 0.0 363 KB

Micro GNU Emacs-like text editor for UNIX

Home Page: http://man.openbsd.org/OpenBSD-current/man1/mg.1

License: The Unlicense

Makefile 0.37% Shell 0.01% M4 0.83% C 93.03% Roff 5.76%

mg's Introduction

Micro Emacs

License Badge Travis Status Coverity Status

Mg is a public domain Micro Emacs derivative. Created in 1986 based on the original MicroEMACS released by Dave Conroy in 1985.

The intention is to be a small, fast, and portable Emacs-like editor for users who cannot, or do not want to, run the real Emacs for one reason or another. Compatibility with GNU Emacs is key for Mg, separating it from other ErsatzEmacs clones, because there should never be any reason to learn more than one Emacs flavor.

The size constraints and target audience pose challenging limitations on the feature set of Mg. It is not scriptable or extensible like a true Emacs, although a startup file is supported, and not all features are available.

Feature patches are of course most welcome, as long as they remain in the spirit of Mg -- to be small, fast, and portable.

Note: the official portable Mg project, used by Debian and other GNU/Linux distributions, is maintained by Han Boetes. Unlike this project, which is stand-alone, it uses libbsd to maintain portability and follows the OpenBSD version very closely.

Building

This project maintains a set of patches on top of OpenBSD Mg, one of which is a standard GNU configure script to simplify building on various UNIX systems, as well as cross compilation to different targets.

The project is almost completely self hosting, you need a 3rd party termcap library, or ncurses, to provide terminal manipulation APIs like setupterm(), tgoto(), and tputs().

On Debian/Ubuntu systems:

sudo apt install libncurses5-dev

Then build mg from the unpacked release tarball:

./configure
make
sudo make install

Users who checked out the source from GitHub must run ./autogen.sh first to create the configure script. This requires GNU autotools to be installed on the build system.

There are several options to the configure script to disable features, e.g., to reduce the size, or remove features if you want to be on par with the official Mg. By default, all below features are enabled:

./configure --help
[..]
--disable-autoexec   Disable auto-execute support
--disable-cmode      Disable C-mode support
--disable-compile    Disable C compile & grep mode, used by C-mode
--disable-cscope     Disable Cscope support
--disable-ctags      Disable ctags(1) support, required by Cscope
--disable-dired      Disable directory editor
--disable-notab      Disable notab mode support (not in OpenBSD)
--disable-regexp     Disable full regexp search
--disable-all        Disable all optional features
[..]
--with-startup=FILE  Init file to run at startup if ~/.mg is missing

To build the smallest possible mg, with many features removed:

./configure --disable-all --enable-size-optimizations
make
sudo make install-strip

To build a completely static mg with all features:

./configure LDFLAGS="-static"
make
sudo make install-strip

History

The history is long and intertwined with other MicroEMACS spin-offs but goes something like this:

  • Nov 16, 1986: First release to mod.sources
  • Mar 3, 1987: First Release (mg1a) via comp.sources.unix
  • May 26, 1988: Second release: (mg2a) via comp.sources.misc
  • Jan 26, 1992: Linux port released by Charles Hedrick. This version later makes its way onto tsx-11, Infomagic, and various other Linux repositories.
  • Feb 25, 2000: First import into the OpenBSD tree, where it is currently maintained with contributions from many others.
  • May 8, 2016: First import from OpenBSD 5.9 to GitHub
  • May 15, 2016: First major release from GitHub
  • Jul 22, 2018: Second major release from GitHub, now standalone!

See the source distribution for the list of AUTHORS.

Origin and References

This project is derived from OpenBSD Mg, which is the best (maintained) source of the original Micro Emacs. The intention of this project is to track all clones, and unlike the OpenBSD version, enable as much of its hidden features as possible using a standard GNU configure script, while being friendly to porting to resource constrained systems.

Please report any bugs and problems with the packaging and porting to the GitHub issue tracker https://github.com/troglobit/mg/issues

mg's People

Contributors

troglobit avatar fobser avatar skotchandsoda avatar ischwarze avatar martinkrw avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.