GithubHelp home page GithubHelp logo

kira-bruneau / emacs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from masm11/emacs

0.0 1.0 0.0 1.21 GB

Mirror of GNU Emacs

Home Page: http://www.gnu.org/software/emacs/

License: GNU General Public License v3.0

Emacs Lisp 61.49% Roff 19.00% Makefile 0.41% C 16.82% Perl 0.12% Awk 0.03% Shell 0.17% Python 0.04% NSIS 0.01% Batchfile 0.02% HTML 0.10% M4 0.69% GDB 0.04% PostScript 0.16% TeX 0.59% SRecode Template 0.05% Smalltalk 0.05% JavaScript 0.07% NewLisp 0.06% Ruby 0.10%

emacs's Introduction

Emacs supporting pure-gtk3

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

Building

You need cairo.

git clone https://github.com/masm11/emacs.git
cd emacs
./autogen.sh
./configure --with-pgtk --with-cairo --with-modules
make

Ignore warnings.

For archlinux users

This repository contains PKGBUILD, so you can install by:

mkdir /tmp/emacs
cd /tmp/emacs
wget https://raw.githubusercontent.com/masm11/emacs/pgtk/PKGBUILD
makepkg -s
sudo pacman -U emacs-pgtk*.tar.xz

Running

./src/emacs

If you want to know whether it is really running on wayland native, then run as follows:

GDK_BACKEND=wayland ./src/emacs

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:

(pgtk-backend-display-class)

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

Note: Segmentation fault may occur on multiple display environment.

Child Frames

I reimplemented child frames to resolve these issues: #46, #48, and #49.

In this new version, child frames don't extend beyond the parent frame.

Instead of xrdb

X has the resource database, and you could store initial default values into it.

Gtk/Gdk can't handle it even if on X11, so I implemented similar feature using gsettings.

Saving:

(pgtk-set-resource "background" "gray")

Getting:

(x-get-resource "background" "Background")

If your emacs got failing to start, then edit your settings with dconf-editor. Your settings are saved under /org/gnu/emacs/defaults-by-name/<instance-name>/ and /org/gnu/emacs/defaults-by-class/. All are of string type. Correct your mistakes.

TODO

Known problems:

  • Segmentation fault while multiple-display.
  • Exits when a connection to display server is closed by peer. (I may not be able to resolve.)

Not implemented:

  • GTK on wayland does not implement functions for these features:
    • x_set_no_focus_on_map
    • x_set_no_accept_focus
    • x_set_z_group
    • auto-raise/lower
  • GTK does not implement functions for these features:
    • vendor_specific_keysyms
  • Some other features. Keywords:
    • gtk_plug (not exists on wayland)
    • frame_x_embedded_p

I may not develop them because I don't use them.

Debugging

Edit src/pgtkterm.h to uncomment:

#define PGTK_DEBUG 1

It enables so much debugging outputs.

On gdb, you may want to do:

(gdb) handle SIGPIPE nostop noprint

Input Methods

You should be able to use input methods since GtkIMContext is enabled by default.

If you don't like GtkIMContext, you can disable it by writing as follows in ~/.emacs:

(setq pgtk-use-im-context-on-new-connection nil)

My Environment

  • archlinux
  • gtk+ 3.24.23
  • glib2 2.64.5
  • gcc 10.2.0
  • wayland 1.18.0
  • wayland-protocols 1.20
  • cairo 1.17.2
  • freetype2 2.10.2
  • imagemagick 7.0.10.29
  • ibus 1.5.22
  • mozc 2.23.2815.102
  • wayfire 0.5.0

Notice

We (@masm11 and @fejfighter) are going to push @fejfighter's fork to the fsf's repository, instead of my fork. @fejfighter's one is rebaseable and have English commit messages. See #23.

About me

masm11.

emacs's People

Watchers

 avatar

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.