I don't use Emacs on Windows, nor do I use xwidgets, but I do know that Emacs has to be compiled with xwidgets (since some of its stuff is written in C) for it to work. Taking a cursory look at the configure
options for Emacs, I see a particular option for compiling Emacs with xwidgets:
--with-xwidgets enable use of some gtk widgets in Emacs buffers
(requires gtk3)
I'm not sure how you would compile Emacs like this on Windows, but my first guess would be to use Cygwin or something similar.
EDIT:
Here's an article about compiling Emacs with Xwidgets support on Windows via Cygwin, courtesy of M.W. I'll copy it here for convenience and to circumvent link rot:
Setup Emacs with PDF Tools and Xwidgets web browser on Windows
Installation instructions:
Prerequisite
- Download
Cywing
setup from Cygwin's Install page.
- If you want only the PDF reader, you can install the Emacs shipped by
Cygwin. However, if you also want the web browser, then you need to
compile your own Emacs 25 from source.
With PDF reader
DEMO (Notice how I press some text in PDF file and Latex buffer jumps to corresponding automatically).
First, don’t use MELPA; you must install pdf-tools manually from this repository. Then, you need to install Cygwin. The following dependencies are needed:
If you don't plan to use Xwidget browser, just install Emacs from Cygwin:
- emacs-w32 (Editors category)
Then install the tool chain for PDF Tools:
- make (Devel category)
- gcc-core (Devel category)
- gcc-g++ (Devel category)
- autoconf (Devel category)
- automake (Devel category)
- perl (Perl category)
Then install Poppler development library:
- libpoppler-devel (Lib category)
- libpoppler-glib-devel (Lib category)
Just type the dependency name above and click to choose. For example, enter libpoppler-devel into the search box.
After all dependencies installed, clone pdf-tools
:
git clone https://github.com/politza/pdf-tools
Then, go into pdf-tools directory and build it:
make
When the compilation is done, from your Cygwin Terminal, copy the file server/epdfinfo.exe
into /usr/bin/
:
cp server/epdfinfo.exe /usr/bin/
Then, also within Cygwin, run emacs command. Within Emacs, run the Emacs command:
M-x package-install-file
- Press
RET
- Select pdf-tools-${VERSION}.tar RET (the tar file is in your
repository).
Finally, run pdf-tools-install and enjoy. Here is the configuration
you can put in your init file:
(pdf-tools-install)
(setq pdf-info-epdfinfo-program "/usr/bin/epdfinfo.exe")
With Xwidgets browser
DEMO
Development libraries for building Emacs that supports Xwidgets:
- libgif-devel (Graphics category)
- libtiff-devel (Lib category)
- libjpeg-devel (Devel category)
- libxpm-devel (Devel category)
- libgnutls-devel (Devel category)
- libpng-devel (Devel category)
- libncurses-devel (Lib category)
- libgtk3-drivel (Lib category)
- libwebkitgtk3.0-devel (Lib category)
Then, install X11 server for displaying Emacs:
- xorg-server (X11 category)
- xinit (X11 category)
Then, open Cygwin terminal and compile Emacs:
./configure --with-xwidgets
make
make install
Finally, set your display:
echo "export DISPLAY=:0.0" >> .bash_profile
Then, from your Start Menu, open the X server:

Then, run your compiled Emacs 25 from Cygwin terminal:
emacs