Skip to content
Branch: master
Clone or download
Pull request Compare This branch is 285 commits ahead, 151 commits behind emacs-mirror:master.
Type Name Latest commit message Commit time
Failed to load latest commit information.
admin Merge from origin/emacs-26 Apr 29, 2019
build-aux Update from Gnulib Apr 30, 2019
doc Merge from origin/emacs-26 May 8, 2019
leim Sync latest SKK-JISYO.L Apr 29, 2019
lib-src Port new fingerprinting scheme to clang + LTO May 4, 2019
lisp Merge branch 'master' of May 11, 2019
m4 Update from Gnulib May 3, 2019
modules Update copyright year to 2019 Jan 1, 2019
msdos Merge from origin/emacs-26 Jan 1, 2019
oldXMenu Fix --with-x-toolkit=no build breakage Apr 27, 2019
test * test/lisp/net/tramp-tests.el (cl-lib): Require instead of cl-seq. May 9, 2019
.clang-format Add configuration for clang-format. Sep 24, 2017
.dir-locals.el Use lexical-binding in bug-reference.el Apr 9, 2019
.gitignore Bring back dmpstruct.h Apr 11, 2019
COPYING Merge from Gnulib Oct 2, 2017
ChangeLog.2 Merge from origin/emacs-26 Jan 1, 2019
ChangeLog.3 Merge from origin/emacs-26 Apr 12, 2019
GNUmakefile * GNUmakefile: Update comment. Apr 16, 2019
INSTALL Modernize INSTALL a bit May 3, 2019
README に cairo のバージョンについて追記。 May 28, 2018 Merge from origin/emacs-26 Jan 1, 2019
config.bat Fix copyright years by hand Jan 1, 2019

Emacs supporting pure-gtk3

In this fork, I'm working to make Emacs support pure-gtk3, in order to support Wayland.

Maybe It's only for Wayland now.

The work is in progress.


You need cairo.

git clone
cd emacs
./configure --without-x --with-cairo --with-modules

Ignore warnings.

For archlinux users

This repository contains PKGBUILD, so you can do to install:

mkdir /tmp/emacs
cd /tmp/emacs
makepkg -s
sudo pacman -U emacs-pgtk*.tar.xz


cd src
GDK_BACKEND=wayland ./emacs  (or try ./emacs -Q if you have problems.)

X11 and Wayland

Of course, PGTK supports X11 and Wayland connections.

You can use GDK_BACKEND environment variable and --display option, and you can do (make-frame-on-display display-name) with display-name of different backend from the first frame.

You can know which backend is used for a frame:


This returns "GdkWaylandDisplay" for Wayland, or "GdkX11Display" for X11.

Note: Segmentation fault may occur on multiple display environment.


Known problems:

  • Segmentation fault while multiple-display.
  • Can't send selection data sometimes.
  • Only small area is drawn when a X11 frame opens. (In the case, you can resize it to be correctly drawn.)
  • Tooltips are stressful.
  • Exits when a connection to display server is closed by peer. (However I may not be able to resolve.)

Not implemented:

  • Toolbar.
  • Menubar.
  • Many other features.

Those may not be developed because I don't use them.


Emacs doesn't support ImageMagick 7.

I wrote this code in

    if test $HAVE_IMAGEMAGICK != yes; then
      IMAGEMAGICK_MODULE="MagickWand-6.Q16HDRI >= 6.3.5 MagickWand-6.Q16HDRI != 6.8.2 MagickWand-6.Q16HDRI < 7 MagickCore-6.Q16HDRI >= 6.9.9 MagickCore-6.Q16HDRI < 7"

However, MagickWand-6.Q16HDRI requires MagickCore, which may be ImageMagick 7. So, you may need to fix Requires: in /usr/lib/pkgconfig/MagickWand-6.Q16HDRI.pc:

Requires: MagickCore-6.Q16HDRI


Edit src/pgtkterm.h to uncomment:

#define PGTK_DEBUG 1

It enables so many debugging outputs.

On gdb, you may want to do:

(gdb) handle SIGPIPE nostop noprint

Supporting Color Emoji Fonts

By default, color fonts are ignored for stability.

To use them, you can write this code in ~/.emacs:

(if (featurep 'pgtk)
    (setq xft-ignore-color-fonts nil))

Changing this variable on the fly may not work.

You may need build and install cairo from git repo. 1.15.12 is insufficient.

My Environment

  • archlinux
  • gtk+-3.22.30
  • glib-2.56.1
  • gnome-shell 3.28.1
  • gcc 7.3.1
  • wayland 1.14.0
  • wayland-protocols 1.13
  • cairo 1.15.12
  • freetype2 2.9


  • This code is NOT completely pure.

    It uses backend-specific functions to obtain the socket file descriptor to the display server. It supports X11 and Wayland.

  • Commit messages are in Japanese.

About me


You can’t perform that action at this time.