Archives For Emacs

emacs-icon245

GNU Emacs text editor finally reached the 25.1 release last night. Here’s how you can install it in Ubuntu 16.04 and Ubuntu 16.10.

Emacs 25.1 release highlights:

  • Emacs can now load shared/dynamic libraries (modules)
  • Experimental support for Cairo drawing
  • Enhanced network security (TLS/SSL certificate validity and the like)
  • New minor mode ‘electric-quote-mode’ for using curved quotes as you type
  • Character folding support in isearch.el
  • Xwidgets: a new feature for embedding native widgets inside Emacs buffers
  • New and improved facilities for inserting Unicode characters

gnu-emacs-25-1

How to install Emacs 25.1 in Ubuntu 16.04:

Besides installing the latest snapshot via the daily build PPA, it’s easy to build the 25.1 stable release by following the steps below one by one:

Remove previous Emacs if any before getting started:

1. Open terminal (Ctrl+Alt+T) and run command to install build tools:

sudo apt install build-essential checkinstall

Type in your password (no visual feedback) when it asks and hit Enter.

install-build-tools

2. Then install the build dependencies via command:

sudo apt-get build-dep emacs24

emacs-build-deps

1. Emacs 24 and 25 use the same build dependencies.

2. For those who have upgraded Intel driver using Intel Graphics Update Tool for Linux, like me, you won’t be able to install these dependencies. You need to downgrade the intel graphcs driver first.

3. Now download the source at ftp.gnu.org/gnu/emacs/, then extract:

emacs25-source

4. Open terminal and navigate to the “emacs-25.1” folder via command (or select “Open in terminal” from its context menu):

cd ~/Downloads/emacs-25.1

navigate-emacs-folder

5. In the same terminal window, once you’re in the source folder, run the commands below one by one:

./configure

make

For the default GTK version in Ubuntu 16.04, there’s a known bug for multiple displays.

6. Finally use checkinstall command to create .deb and install Emacs 25.1:

sudo checkinstall

While running the command, answer on screen questions, e.g., install docs, type package description, change package name, version, etc.

Emacs checkinstall

Once done, Emacs 25.1 is installed on your system and you can remove it anytime by running the command in the prompt with sudo privilege:

emacs-install-success

In my case it’s:

sudo dpkg -r emacs-25

And the last command create a .deb package in the source folder, and it can be used in another Ubuntu machine to install Emacs 25.1 (need to manually install dependencies via step 2).

Finally, run command emacs to launch the text editor, or launch it from Unity Dash (App Launcher) at next login (or next boot).

Emacs 24.4 in Ubuntu 14.04

GNU Emacs has finally reached version 24.4 with many new features and improvements. The most notable is that the text editor brings a built-in web browser.

GNU Emacs is the most popular and most ported Emacs text editor, and it was created by Richard Stallman for the GNU Project.

The latest release Emacs 24.4 was released a few hours ago. The new release features:

  • A built-in web browser (M-x eww)
  • Improved multi-monitor and fullscreen support
  • “Electric” indentation is enabled by default
  • Support for saving and restoring the state of frames and windows
  • Emacs Lisp packages can now be digitally signed
  • A new “advice” mechanism for Emacs Lisp
  • File notification support
  • Pixel-based resizing for frames and windows
  • Support for menus in text terminals
  • A new rectangular mark mode (C-x SPC)

Emacs 24.4 in Ubuntu 14.04

How to Install Emacs 24.4 in Ubuntu:

At the moment of writing this tutorial, there’s no PPA repository that contains Emacs 24.4. Fortunately, it’s not hard to build it from the source tarball. I’ve done it successfully in 64-bit Ubuntu 14.04 LTS. Below steps will show you how:

1. If have the old Emacs 24.3 installed, you may first remove it from Ubuntu Software Center so that you can install the new version over it.

2. Press Ctrl+Alt+T on keyboard to open terminal, or open it from the Unity Dash.

Open Terminal to run commands

3. Run command below to install the build-essential:

sudo apt-get install build-essential

4. Install the required dependencies:

sudo apt-get build-dep emacs24

While the installing process, you’ll be asked to configure the Postfix.

5. Now download Emacs 24.4 from its official FTP download page.

Emacs FTP download Page

6. Extract the source and go into the result folder in terminal:

cd ~/Downloads && tar -xf emacs-24.4.tar.* && cd emacs-24.4

7. Finally compile the package by running commands below one by one.

./configure

make

sudo make install

Once done, you should be able to launch Emacs by running emacs or emacs-24.4 in terminal and lock the shortcut to the Unity Launcher.

To create a launcher for Emacs 24.4. Thanks to Emad Khoury, run command to create a .desktop file and edit it with Gedit text editor:

sudo gedit /usr/share/applications/Emacs-24.desktop

When the file opens, paste below into it and save the file.

[Desktop Entry]
Version=1.0
Name=Emacs-24
Exec=env UBUNTU_MENUPROXY=0 /usr/local/bin/emacs
Terminal=false
Icon=emacs
Type=Application
Categories=IDE
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
TargetEnvironment=Unity

Depends on where you install Emacs 24, you may replace the value of Exec and Icon to the path to executable and shortcut icon file.

gnu emacsThis tutorial shows how to install the latest stable GNU Emacs (so far, it’s 24.3) in Ubuntu 13.04 Raring, Ubuntu 12.10, Ubuntu 12.04 Precise and their deviratives such as Linux Mint and Elementary OS Luna via PPA.

Highlights of Emacs 24.3 include:

  • Generalized variables are now in core Emacs Lisp.
  • An update for the Common Lisp emulation library.
  • A new major mode for Python.

There are many more changes; for a summary see the etc/NEWS file, which you can view from Emacs with `C-h n’.

Install / Upgrade Emacs 24.3 via PPA:

Press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run below command to add the PPA:

sudo add-apt-repository ppa:cassou/emacs

Then update package lists on your system:

sudo apt-get update

After that, you can install or upgrade via synaptic package manager, which is available in Ubuntu Software Center. Or just run below command:

sudo apt-get install emacs24

Enjoy!