unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob e4b9f42c3ea13d24871fd7f74e7dfb9b95cc6e92 3213 bytes (raw)
name: README.md 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
 
# 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.

```sh
git clone https://github.com/masm11/emacs.git
cd emacs
./autogen.sh
./configure --without-x --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

```sh
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:

```elisp
(pgtk-backend-display-class)
```

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

Note: Segmentation fault may occur on multiple display environment.

## 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:
```elisp
(pgtk-set-resource "background" "gray")
```

Getting:
```elisp
(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_offset
  - 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:
  - popup_activated
  - gtk_plug (not exists on wayland)
  - x_set_parent_frame
  - frame_x_embedded_p

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

## Debugging

Edit src/pgtkterm.h to uncomment:

```c
#define PGTK_DEBUG 1
```

It enables so much debugging outputs.

On gdb, you may want to do:

```
(gdb) handle SIGPIPE nostop noprint
```

## Input Methods

```elisp
(when (eq window-system 'pgtk)
  (pgtk-use-im-context t))
```

This enables Gtk's `GtkIMContext`.

However, when you type e.g. `C-x o`,
`C-x` goes through input methods and is handled by Emacs,
and `o` is handled by input methods, so `お` appears as a preedit text.
I have no idea. You can turn off input method before typing `C-x o`.
I do, so no problem.

## My Environment

- archlinux
- gtk+ 3.24.13
- glib2 2.62.4
- gcc 9.2.0
- wayland 1.17.0
- wayland-protocols 1.18
- cairo 1.17.2
- freetype2 2.10.1
- imagemagick 7.0.9.16
- ibus 1.5.21
- mozc 2.23.2815.102
- wayfire 57a585d

## Notice

- Commit messages are in Japanese.

## About me

masm11.

debug log:

solving e4b9f42c3e ...
found e4b9f42c3e in https://yhetil.org/emacs-devel/87zhaxjpea.fsf@yahoo.com/

applying [1/1] https://yhetil.org/emacs-devel/87zhaxjpea.fsf@yahoo.com/
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..e4b9f42c3e

Checking patch README.md...
Applied patch README.md cleanly.

index at:
100644 e4b9f42c3ea13d24871fd7f74e7dfb9b95cc6e92	README.md

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).