Git Product home page Git Product logo

mg's Introduction

Micro (GNU) Emacs

License Badge GitHub Status Coverity Status

Contents

Introduction

Mg is a Micro Emacs clone created in 1987, based on the original MicroEMACS v30 released by Dave Conroy in 1985. The name, "Micro GNU Emacs", was disputed early on by the FSF, so today it simply goes by mg. This software is fully free and in the public domain.

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.

Try the latest release, use the tarball with a version in the name, avoid GitHub generated links! Releases come with a configure script, so you don't need autotools. Only a C compiler, make and you're set to go.

Usage

When Emacs was born keyboards had a Meta key. Accessing functions with Meta combinations today is usually the same as holding down the Alt key, or tapping Esc once.

Other editors use short forms like Ctrl-V or ^V, in Emacs this is written C-v. Some usage examples:

Key Short Example Description
Meta M- M-x Hold down Alt and tap x
Ctrl C- C-g Hold down Ctrl and tap g
Ctrl C- C-x C-c Hold down Ctrl then tap x and c

To access the built-in Quick Help, press C-h q, meaning: hold down Ctrl and tap h, then release Ctrl and tap q. The - has a meaning, as you can see.

Building

This project is completely self hosting. However, by default you need a termcap library, like Ncurses, to provide APIs like: setupterm(), tgoto(), and tputs().

See below for how to build without Ncurses.

With termcap/terminfo/curses

On recent Debian/Ubuntu based systems libtinfo-dev can be used, on older ones the include file term.h is missing, so libncurses-dev must be used instead:

sudo apt install libtinfo-dev

or

sudo apt install libncurses-dev

On other systems you have to install the full Ncurses library instead, on RHEL, CentOS, and Fedora:

sudo yum install ncurses-devel

or

sudo dnf install ncurses-devel

On macOS you need the Xcode command line tools and headers:

xcode-select --install

Then build Mg from the unpacked release tarball:

./configure
make
sudo make install

Without curses, completely stand-alone

make clean
./configure --without-curses
make
sudo make install

Building from GIT

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-togglenl   Disable toggle-newline-prompt extension (not in OpenBSD)
--disable-all        Disable all optional features
[..]
--with-startup=FILE  Init file to run at startup if ~/.mg is missing
--with-mglog         Enable debugging to log file, default: ./log/*.log
--without-curses     Build without curses/termcap, default: auto

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

Docker

Alpine Linux based Docker container images are available from GitHub:

docker pull ghcr.io/troglobit/mg:latest

To edit files from your host's $HOME, map it to the container's /root and run:

docker run -ti -v $HOME:/root ghcr.io/troglobit/mg:latest

This supports reading your ~/.mg and it even takes arguments on the command line. Both quick help and the tutorial are bundled.

History

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

  • Nov 15, 1985: MicroEMACS v30 released to mod.sources by Dave G. Conroy
  • 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: Import from OpenBSD 5.9 to GitHub
  • May 15, 2016: Mg v3.0, first port back to Linux, by Joachim Wiberg
  • Jul 22, 2018: Mg v3.1, removed libite dependency, by Joachim Wiberg
  • Aug 26, 2018: Mg v3.2, now fully portable1, by Joachim Wiberg
  • Dec 11, 2019: Mg v3.3, misc fixes and new features from OpenBSD
  • Aug 23, 2020: Mg v3.4, new modeline, quick-help, support for gzipped files, and building without termcap/Ncurses, by Joachim Wiberg
  • Oct 17, 2021: Mg v3.5, support for Solaris/Illumos based UNIX systems tested on OmniOS and OpenIndiana, sync with Mg from OpenBSD 7.0
  • Apr 10, 2023: Mg v3.6, sync with OpenBSD, improved ctags support
  • Aug 13, 2023: Mg v3.7, sync with OpenBSD, improved usability

See the source distribution for the list of AUTHORS.

Origin & References

This project is derived from OpenBSD Mg, which is the best (maintained) source of the original Micro Emacs based on mg2a. The intention of this project is to develop new usability features, track as many other Mg clones as possible, and, unlike the upstream OpenBSD version, enable hidden features using a standard GNU configure script, while remaining friendly to porting to resource constrained systems. New features:

  • Emacs-like modeline with (row,col) and new display-time-mode
  • Support for building without curses, using termios + escape seq.
  • Support for exhuberant/universal ctags tags file format
  • Built-in *quick* help using C-h q
  • Tutorial accessible using C-h t
  • Support for Ctrl-cursor + Ctrl-PgUp/PgDn like Emacs
  • Support for M-x no-tab-mode and M-x version
  • Support for opening gzipped text files in read-only mode

Merged, and continously tracked, clones:

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, Boetes relies on libbsd to maintain portability.

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

Footnotes

  1. This project has been extensively tested on Debian GNU/Linux, Ubuntu, CentOS, Fedora, Alpine Linux, Solaris/Illumos based systems like OmniOS, FreeBSD, NetBSD, OpenBSD, DragonFly BSD, Apple macOS >= 10.10, Cygwin, MSYS2, as well as a few embedded Linux systems using musl libc and uClibc-ng.

mg's People

Contributors

botovq avatar bscuron avatar ffontaine avatar fobser avatar g-branden-robinson avatar ischwarze avatar jonathangray avatar kisom avatar martinkrw avatar mkhl avatar omar-polo avatar phikal avatar rapenne-s avatar reyk avatar skotchandsoda avatar troglobit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mg's Issues

Build on Ubuntu 16.04

To build on ubuntu libncurses5-dev is required. Maybe you can add this to the readme.

GUI rendering in WSL

certain things that require redraw behave strangely. for example, C-l makes parts of the screen black, and highlighting from mark to point via C-space don't seem to show up

Possible to delete a region?

Hello thank you for this editor,

I am wondering if there are two things possible:

  1. Selecting region will show a highlight of the region similar to transient-mark-mode.
  2. Can you delete a whole region by selecting it and pressing backspace?

build problem on Debian 11

It doesn't build:

% ./configure 
: 
------------------ Summary ------------------
 Mg version 3.4
  Prefix.........: /usr/local
  Sysconfdir.....: /usr/local/etc
  Docdir.........: ${prefix}/share/doc/mg
  Fallback ~/.mg.: /usr/local/etc/mg
  C Compiler.....: gcc -g -O2   -ltermcap 
  Size optimize..: no 
  Termcap/curses.: yes 

 Optional features:
  autoexec.......: yes
  cmode.-........: yes
  compile mode...: yes
  cscope.........: yes
  ctags..........: yes
  dired..........: yes
  regexp.........: yes

------------- Compiler version --------------
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---------------------------------------------

Check the above options and compile with:
 make

% make
Making all in src
make[1]: Entering directory '/local/tmp/mg-3.4/src'
make  all-am
make[2]: Entering directory '/local/tmp/mg-3.4/src'
  CC       mg-basic.o
  CC       mg-bell.o
  CC       mg-buffer.o
: 
  CC       ../lib/strtonum.o
  CCLD     mg
/usr/bin/ld: mg-bell.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-buffer.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-cinfo.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-dir.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-display.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-echo.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-extend.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-file.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-fileio.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-funmap.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-help.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-interpreter.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-kbd.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-keymap.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-line.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-macro.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-main.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-match.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-modes.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-paragraph.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-region.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-search.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-spawn.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-tty.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-ttyio.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-ttykbd.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-undo.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-util.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-version.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-window.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-word.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-yank.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-extensions.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-autoexec.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-cmode.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-grep.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-cscope.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-tags.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-dired.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-re_search.o:/local/tmp/mg-3.4/src/def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: ../lib/fparseln.o:/local/tmp/mg-3.4/src/./def.h:653: multiple definition of `hlp'; mg-basic.o:/local/tmp/mg-3.4/src/def.h:653: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:500: mg] Error 1
make[2]: Leaving directory '/local/tmp/mg-3.4/src'
make[1]: *** [Makefile:398: all] Error 2
make[1]: Leaving directory '/local/tmp/mg-3.4/src'
make: *** [Makefile:451: all-recursive] Error 1

tty.c: siginterrupt is deprecated

Warning produced by gcc 10.2.0 on Linux. I am unaware if the proposed change by the compiler is portable to other systems.

tty.c: In function ‘ttinit’:
tty.c:73:2: warning: ‘siginterrupt’ is deprecated: Use sigaction with SA_RESTART instead [-Wdeprecated-declarations]
   73 |  siginterrupt(SIGWINCH, 1);
      |  ^~~~~~~~~~~~
In file included from tty.c:33:
/usr/include/signal.h:311:12: note: declared here
  311 | extern int siginterrupt (int __sig, int __interrupt) __THROW
      |            ^~~~~~~~~~~~

Segfault on Ubuntu with <ctrl-c> <space>

I donwloaded the source for v3.4, configured with

./configure --disable-ctags --disable-cscope

The compiled it and tried src/mg without installing it. Everything looked nice until I accidentally hit
<Ctrl-c> <Space> and then

[1]    15885 segmentation fault (core dumped)  src/mg

BTW

~ ➤ uname -a                                                                   
Linux paag-EliteBook 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
~ ➤ lsb_release -c                                                             
Codename:	focal
~ ➤ lsb_release -a                                                             
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal

config file examples

Can you share some examples of .mg config files please?

There is nothing non the web unfortunately

Compile errors then fail.

I can compile the 3.4 under CentOS 7 but not Debian Testing .
Lots of errors about multiple definition of `hlp' , thanks

/usr/bin/ld: mg-bell.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition ofhlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-buffer.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-cinfo.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-dir.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-display.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-echo.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-extend.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-file.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-fileio.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-funmap.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-help.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-interpreter.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-kbd.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-keymap.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-line.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-macro.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-main.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-match.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-modes.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-paragraph.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-region.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-search.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-spawn.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-tty.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-ttyio.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-ttykbd.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-undo.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-util.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-version.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-window.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-word.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-yank.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-extensions.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-autoexec.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-cmode.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-grep.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-cscope.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-tags.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: mg-dired.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
/usr/bin/ld: mg-re_search.o:/media/chris/data/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here /usr/bin/ld: ../lib/fparseln.o:/media/chris/data/mg-3.4/src/./def.h:653: multiple definition of hlp'; mg-basic.o:/media/chris/data/mg-3.4/src/def.h:653: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:500: mg] Error 1
make[2]: Leaving directory '/media/chris/data/mg-3.4/src'
make[1]: *** [Makefile:398: all] Error 2
make[1]: Leaving directory '/media/chris/data/mg-3.4/src'
make: *** [Makefile:451: all-recursive] Error 1

`

Backspace Key not deleting

Hello, as I read in the tutorial file, it said To delete characters, use the backspace key. But when I did backspace, it showed a b c:. I am not sure if this has a different meaning, but it would be useful to have a backspace working rather than moving one letter forward and doing ^D.
Thanks

Errors on cygwin

On cygwin, with
./configure
make

I get this error.

c/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-autoexec.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-cmode.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-grep.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-cscope.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-tags.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-dired.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-re_search.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: mg-ansi.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: ../lib/fparseln.o:/c/Users/chris/Downloads/mg-3.4/src/./def.h:653: multiple definition of hlp'; mg-basic.o:/c/Users/chris/Downloads/mg-3.4/src/def.h:653: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:500: mg.exe] Error 1

Now it's been a while since I coded C, but in def.h it has...

const char * hlp;

Seems like a no-no to declare a variable in a header file to me. Anyway I changed this to..

extern char * hlp;

and then it compiled and linked

But the other problem is, when I start the editor, nothing happens until I press any key. So if I type
src/mg foo [enter]

Nothing at all happens until I press some other key... like for example, pressing enter a second time. Or just pressing any key.

feature: press f5 to insert timestamp in user format

Hi,
Love mg. had this feature in emacs init, felt very useful to quickly add a timestamp in file, journal or code. Was used to it in an old windows text editor. Can we add this to mg please? I do see an mg command of 'display-time-mode' that does something different. mg(osx) doesn't recognise f1-f4, and thinks f5-f10 is ~. Raised it with ibara/mg a few months back, still untouched. In emacs init it was like this bound to [f5], (insert (format-time-string "%Y %b %d %p %-I\n"))) ;2020 Sep 02 PM 10 24

Also, hboetes mg has a release on 2022 Nov 12, that may have something useful to merge.
Thanks,
Rahul

highlight selected region

I've compiled mg for Mac but selecting a region (eg. C-SPC, C-e) doesn't highlight the text.
Is this normal? On normal full Emacs it does highlight it.

grep not working

I cant seem to get grep to work, neither on the official package nor this repository. Is this issue known?

Cannot build

The build instructions say to run ./configure, but there is no configure. I thought I'd try installing automake to see if that got me any further, but it didn't seem to, at least on cygwin.

Please remove annoying message when saving

When you save a file without a terminating linefeed the system says: No newline at end of file, add one? (y or n) This is very annoying. No other editor I know does this. Please remove this!

There are a 1000 other checks your editor could perform and warn me about at save time. Please don't!

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.