How to install Emacs in Ubuntu 17.04

To install Emacs in Ubuntu 17.04

Emacs is an extensible, customizable, self-documenting, real-time display editor. Emacs runs on several operating systems. Emacs and its derivatives are a family of text editors that are characterized by their extensibility. Emacs Lisp gives an extension capability allowing users and developers to write new commands using a dialect of the Lisp programming language with different " modes" , enabling it to be used like an Integrated Development Environment (IDE) for programming languages like Java, C or Python. It contains features such as Content-aware editing modes, Complete built-in documentation, Highly customizable, using Emacs Lisp code or a graphical interface. This tutorial explains the installation procedure of Emacs in Ubuntu 17.04.

Installation procedure

To begin with the installation procedure, add the repository for the Emacs and run the following command.

root@linuxhelp:~# add-apt-repository ppa:kelleyk/emacs
 This repository contains updated `emacs` packages based on stable releases.

The following package series are available:
  - `emacs25`: based on 25.x-series releases.

On top of each series, I have applied the following patches:
  - A fix for an `xinput`-related bug that, when triggered, causes `emacs` to enter an infinite loop  the process will then be unresponsive and will consume 100% of a single CPU core until you kill it.

Debug symbols are available!  After adding the PPA however you normally do, find the corresponding entry in `/etc/apt/sources.list.d`.
It will look like the first line below (though the suite name may be different if you are not using xenial)  duplicate it and change the component name (" main" ) to " main/debug" .
.
.
.
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox ' /tmp/tmpllqea0i4/pubring.gpg'  created
gpg: /tmp/tmpllqea0i4/trustdb.gpg: trustdb created
gpg: key 3FF0E01EEAAFC9CD: public key " Launchpad PPA for Kevin Kelley"  imported
gpg: Total number processed: 1
gpg:               imported: 1
OK

The repositories are added to the target system. Next update the apt-get update system by executing the apt-get update command.

root@linuxhelp:~# apt-get update
Hit:1 http://security.ubuntu.com/ubuntu zesty-security InRelease               
Hit:2 http://in.archive.ubuntu.com/ubuntu zesty InRelease                      
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease       
Get:4 http://ppa.launchpad.net/kelleyk/emacs/ubuntu zesty InRelease [21.3 kB]
Hit:5 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Get:6 http://ppa.launchpad.net/kelleyk/emacs/ubuntu zesty/main amd64 Packages [1,372 B]
Get:7 http://ppa.launchpad.net/kelleyk/emacs/ubuntu zesty/main i386 Packages [1,368 B]
Get:8 http://ppa.launchpad.net/kelleyk/emacs/ubuntu zesty/main Translation-en [580 B]
Fetched 24.6 kB in 3s (7,145 B/s)
Reading package lists... Done

The target system is updated with the required repositories. Install the Emacs application by running the install command.

root@linuxhelp:~# apt install emacs25
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  emacs25-common gconf-service gconf-service-backend gconf2-common
  libgconf-2-4 libgif7 liblockfile-bin liblockfile1 libm17n-0 libotf0 m17n-db
Suggested packages:
  m17n-docs gawk
The following NEW packages will be installed:
  emacs25 emacs25-common gconf-service gconf-service-backend gconf2-common
.
.
.
.
update-alternatives: using /usr/bin/ebrowse25 to provide /usr/bin/ebrowse (ebrowse) in auto mode
update-alternatives: using /usr/bin/emacs-25.325 to provide /usr/bin/emacs-25.3 (emacs-25.3) in auto mode
update-alternatives: using /usr/bin/emacs25 to provide /usr/bin/emacs (emacs) in auto mode
update-alternatives: using /usr/bin/emacsclient25 to provide /usr/bin/emacsclient (emacsclient) in auto mode
update-alternatives: using /usr/bin/etags25 to provide /usr/bin/etags (etags) in auto mode
Processing triggers for libc-bin (2.24-9ubuntu2) ...

The Emacs application has been installed in the target system and type the application name in the Ubuntu dashboard. Click on the icon to run the application.

The Emacs application is running successfully in the target machine.

The installation procedure of Emacs application is done without any glitches.

Tag : Emacs Ubuntu
FAQ
Q
Whether is it available for MAC ?
A
yes, its available for MAC also.
Q
Whether is it available for windows ?
A
yes,it is available for windows.
Q
i did: tazpkg get-install emacs (as root) then i try emacs in a terminal and nothing come up: root@BlackMamba:/home/tux#emacs bash: emacs: command not found What do i miss here?
A
root@slitaz: which emacs Should output: /usr/bin/emacs This command will output the path to every file installed by emacs.tazpkg tazpkg list-files emacs
Q
I am not able build emacs 25.1 with xwidgets support in ubuntu 16.04. Can you please guide to do this?
A
apt-get install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev libxpm-dev automake autoconf -y