Coder Social home page Coder Social logo

masm11 / emacs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emacs-mirror/emacs

198.0 19.0 14.0 1.29 GB

Mirror of GNU Emacs

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

License: GNU General Public License v3.0

Emacs Lisp 61.66% Roff 18.90% Makefile 0.41% C 16.76% Perl 0.12% Awk 0.03% Shell 0.17% Python 0.04% NSIS 0.01% Batchfile 0.02% HTML 0.10% M4 0.68% GDB 0.04% PostScript 0.16% TeX 0.58% SRecode Template 0.05% Smalltalk 0.05% JavaScript 0.07% NewLisp 0.06% Ruby 0.10%
emacs wayland gtk3

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.66.2
  • gcc 10.2.0
  • wayland 1.18.0
  • wayland-protocols 1.20
  • cairo 1.17.2
  • freetype2 2.10.4
  • imagemagick 7.0.10.39
  • ibus 1.5.23
  • mozc 2.23.2815.102
  • wayfire 0.6.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

Contributors

acinnes avatar albinus avatar andreas-schwab avatar belanger avatar dgutov avatar dmantipov avatar drmirror avatar eggert avatar eli-zaretskii avatar jave avatar larsmagne avatar lektu avatar leoliu avatar link0ff avatar loveshack avatar malabarba avatar mattiase avatar mituharu avatar monnier avatar nicolaspetton avatar npostavs avatar paveljanik avatar phst avatar rfrancoise avatar rgmorris avatar sam-s avatar skangas avatar snogglethorpe avatar wohler avatar yamaoka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emacs's Issues

Scrolling using touch pad only partially works

Summary

Scrolling a buffer using the touch pad doesn't work for the most part. Sometimes Emacs will scroll, but in large jumps that are not predictable or useful.

Software and hardware versions

  • M-x emacs-version says:

    GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)

  • guix show emacs-next-pgtk says:

    version: 28.0.50-0.3df4ca4

  • Operating system is elementary OS 5.1.7 Hera

  • Hardware is a 2019 Dell XPS 13 with no peripherals attached

How to trigger the issue

Start Emacs using: guix environment --pure --ad-hoc emacs-next-pgtk -- emacs -Q

Load a buffer and scroll using a touch pad.

Expected behavior

Emacs should begin scrolling the buffer right away.

Observed behavior

Emacs mostly does not respond to touchpad scrolling at all. On occasion the buffer scroll position jumps suddenly in the direction I'm trying to scroll.

Workarounds

  • Keyboard scrolling works: I can scroll the buffer just fine using the C-v, M-v, etc
  • GTK scrollbar works
  • Touch-pad scrolling works in upstream Emacs 27 and 28

I don't observe any unusual or undesirable behaviors when scrolling using those methods. Only scrolling using the touch pad in the pgtk build seems to be affected.

P.S.

THANK YOU for working on this fantastic software!

GTK Error on childframes Pt II

Somewhat related to #61. When running certain childframes from company-mode an error

(emacs:722892): Gtk-CRITICAL **: 15:05:45.917: gtk_window_set_focus_on_map: assertion 'GTK_IS_WINDOW (window)' failed

(emacs:722892): Gtk-CRITICAL **: 15:05:46.586: gtk_window_set_focus_on_map: assertion 'GTK_IS_WINDOW (window)' failed

Appears.

Environment

Wayland & GNOME 3.38

How to reproduce

With the following ~/.emacs config:

;;; ~/.emacs -*- lexical-binding: t; -*-

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))

(use-package company
  :ensure t)

(use-package company-box
  :ensure t)

Run emacs from a terminal. Then, on a lisp mode buffer activate both modes

  • M-x company-mode
  • M-x company-box-mode

And as in a previous issue, invoke company mode by writing (des

No need for GDK_BACKEND=wayland

(compiled from fejfighter's repo - but the doco is here - maybe that should be migrated across)

There's no need for GDK_BACKEND=wayland when running emacs - it automatically runs as a wayland client.

GDK_BACKEND=x11 works as expected.

Fractional Scaling

Is that supported? I tried to set it up with:

export GDK_DPI_SCALE=0.5
export GDK_SCALE=2

However I can't make it work.
My DE is Plasma 20.0.5.

tooltip issue with company-mode

While using company mode the area next to the childframe changes its color.

image

image

Compare this with the behaviour in company-mode's website

image

Which coincides with the behaviour when run with emacs 27.1.

Steps to reproduce

This is a bit tricky since I was not able to reproduce this without doom-emacs default configuration.

  • Install doom emacs
  • On a buffer that supports company-mode (any lisp file) write (des for company mode to show suggestions.

This is not reproducible with the above steps with vanilla emacs 27.1.

Note

I do not know if this is related to childframes or something else.

emacs cannot paste unicode characters correctly

recording.mp4

emacs version https://github.com/emacs-mirror/emacs/tree/175ebb010477ff0e174fe5145154397f43dee2d2
Interim solution

(setq wl-copy-process nil)
(defun wl-copy (text)
  (setq wl-copy-process (make-process :name "wl-copy"
                                      :buffer nil
                                      :command '("wl-copy" "-f" "-n")
                                      :connection-type 'pipe))
  (process-send-string wl-copy-process text)
  (process-send-eof wl-copy-process))
(defun wl-paste ()
  (if (and wl-copy-process (process-live-p wl-copy-process)) nil
    (shell-command-to-string "wl-paste -t text -n 2>/dev/null")))
(setq interprogram-cut-function 'wl-copy)
(setq interprogram-paste-function 'wl-paste)
(setq confirm-kill-processes nil)

pdf-tools' arrow issue on X

The behaviour of the pdf-tools arrow differs on X and Wayland. In X you see

image

while in Wayland the arrow does not have a shadow background.

Moreover, the arrow stays there after alt-tab

image

This was already informed at #51.

Mouse disapears on xwidgets

When opening a webpage using xwidget-webkit-browse-url, the mouse disapears when it is above the buffer. It appears once again after it hits the scrollbar, and there are problably other triggers for it to fix itself.

Screencast: https://imgur.com/a/9oUcPDi
If the quality is bad, here is the original: Screencast.zip

Environment

Fedora Silverblue 33
GNOME 3.38
Wayland

How to reproduce

  • Compile emacs with ./configure --with-cairo --with-modules --with-xwidgets --with-pgtk
  • $ emacs -Q
  • M-x xwidget-webkit-browse-url and enter some url
  • Move mouse above buffer

Disclaimer: Due to some issue with my OS I am unable to run Emacs without pgtk, and therefore to test this in a clean setting.

Childframe remains after losing focus

Childframes remain "on top" after Emacs loses focus, or changing virtual desktop.

Before changing focus:
childframe-overlap-1

After changing focus:
childframe-overlap-2

After changing desktop:
childframe-overlap-3

I'm running the X11 backend on Plasma.

Mouse does not reappear after writing

Sometimes while using Emacs the mouse will disappear, clicking on the screen solves the issue.

This is using the pgtk-nativecomp branch but I am sure the issue was there in the pgtk build too.

system-configuration-features

The variable system-configuration-features shows what features Emacs was compiled with, it should say PGTK, for example.

Mine says:

"JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 XIM MODULES NATIVE_COMP THREADS LIBSYSTEMD JSON PDUMPER LCMS2"

maybe it is listed under GTK3?

Childframe doesn't move with parent

When moving the parent window, the childframe remains in its original position.

Before moving:
childframe-move-1

After moving:
childframe-move-2

I'm running the X11 backend on Plasma.

amazing that this is finally happening

just wanted to say that I installed the AUR package on Arch linux and I can't believe I finally have a gtk emacs after all these years. Really, I'm so very grateful. Thanks.

pdf-tools sync issue, arrow does not render

When pressing C-c C-v (TeX-view) with

(setq TeX-source-correlate-mode t
      TeX-source-correlate-method 'synctex)

enabled, the expected behaviour is that emacs shows a red arrow with white background on the pdf, correlating the source and pdf. On pgtk I get a grey background only.

image

Sometimes segmentation fault when using selectrum-mode

Steps to reproduce.

  • Enable selectrum-mode(or ivy-mode)
  • async-shell-command (M-&)
  • Hit Tab
  Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
Factive_minibuffer_window () at minibuf.c:222
222	  innermost_MB = nth_minibuffer (minibuf_level);

Random Core dump with drag and drop

When dragging files into emacs, there is a random chance that a crash will happen.

This happens very often when writing mail and using drag and drop to include an attachment.

Screencast:
Drag-n-drop-core-dump.zip

Backtrace:


$ emacs -Q
Fatal error 6: Aborted
Backtrace:
emacs[0x50135d]
emacs[0x420198]
emacs[0x420abc]
emacs[0x428216]
emacs[0x435313]
emacs[0x4ef082]
emacs[0x4fabc8]
emacs[0x4ef91e]
emacs[0x56b547]
emacs[0x4e9c84]
emacs[0x56b4a1]
emacs[0x4eaf0b]
emacs[0x635bfb]
emacs[0x4ef663]
emacs[0x429b19]
/lib64/libc.so.6(__libc_start_main+0xf2)[0x7fa4a921a1a2]
emacs[0x42bd2e]
Aborted (core dumped

Environment

GNOME 3.38 & Wayland

Steps to reproduce

Create an empty file touch empty
open in terminal emacs -Q
drag and drop the file Empty onto emcas until a crash happens, see screencast

Note: This appears to happen at random, sometimes it will not happen, sometimes it happens on the second or third time the file is dragged. It might be a memory safety issue?

Edit: Added screencast.

Bind with super key doesn't work

Hi, @masm11!
Thank you for your great work.

Have an issue with bindings using super key (win key).
(global-set-key (kbd "s-o") 'other-window) evaluates properly, but pressing s-o just inserts o in the buffer.

Input method behaviour

One of the goals of Wayland is to be transparent to the user, user facing features should not be different from their X counterpart.

On vanilla emacs -Q 26.3, pressing ´ a results in á on a spanish (Latin America) keyboard, the interface does not tell the user it is waiting after the prefix key ´ has been pressed, this last part is not consistence with the global experience in gtk, where you see, for example
image
(note the underline) on firefox or other gtk apps, when waiting for a key after the prefix ´.

On the pgtk branch, pressing ´ a on emacs -Q wrongly inserts a. Adding

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

Does fix the issue, ´ a results in á , and the behaviour is the expected one for a gtk app (the screenshot above is from pgtk Emacs).

Suggestion

Since the default emacs behaviour is to recognize á, and the expected gtk behaviour is to recognize these bindings and to show this "waiiting" as in the screenshot, (pgtk-use-im-context t) should be set as the default.

My suggestion is to add a variable, named similarly to pgtk-use-im-context, to enable (pgtk-use-im-context t) at startup, this variable is set to t by default. From my experience, this kind of behaviours are generally handled via variables instead of functions, but as long as the defaults are what they should be expected it does not matter how this is implemented.

P.S. This is the one remaining difference (regression) I can notice from vanilla Emacs, thanks for your great work.

X-Widget: assertion '!widget->priv->alloc_needed' failed

When opening a file using xwdiget I get an error

(emacs:150587): Gtk-CRITICAL **: 12:12:04.741: gtk_widget_draw: assertion '!widget->priv->alloc_needed' failed

(emacs:150587): Gtk-CRITICAL **: 12:12:21.983: gtk_widget_draw: assertion '!widget->priv->alloc_needed' failed

This seems to be harmless.

How to reproduce: Not really see below

As in #69, create a file with contents

<head><meta charset="UTF-8"></head>
<p><strong>From</strong>: [email protected]</br><strong>To</strong>: [email protected]</br><strong>Date</strong>: Mon 12 Oct 2020 10:39:34 PM CEST</br><strong>Subject</strong>: [Fedora Update] [comment] toolbox-0.0.96-1.fc33</p><pre>
The following comment has been added to the toolbox-0.0.96-1.fc33 update:

bodhi - 2020-10-12 20:39:34.343089 (karma: 0)
rishi edited this update.

To reply to this comment, please visit the URL at the bottom of this mail

================================================================================
     FEDORA-2020-12c4232ccb
================================================================================
    Release: Fedora 33
     Status: testing
       Type: bugfix
   Severity: high
      Karma: 4
    Request: stable
      Notes: * Don't break GNU Readline's ctrl-p shortcut * Enable system tests
           : on Fedora 33 * Fix containers with missing `/media`
           : possibly due to a failed RPM transaction * Give access
           : to the udev database * Unbreak X11 applications with
           : GNOME 3.38 * Update default release to 31 for non-
           : Fedora hosts
  Submitter: rishi
  Submitted: 2020-10-02 13:56:36.076520
   Comments: bodhi - 2020-10-12 20:39:34.343089 (karma 0)
             rishi edited this update.
             Fixes issues with x11, no notable regressions.
             bodhi - 2020-10-07 14:20:29.828510 (karma 0)
             This update has been submitted for stable by bodhi.
             pnemade - 2020-10-07 14:20:29.375296 (karma 1)
             I can run x11 applications now. Rest usage of toolbox
             looks fine.
             cairo - 2020-10-02 22:57:21.043782 (karma 1)
             bodhi - 2020-10-02 22:20:59.046677 (karma 0)
             This update can be pushed to stable now if the
             maintainer wishes
             bodhi - 2020-10-02 22:18:06.993838 (karma 0)
             This update has been pushed to testing.
             feborges - 2020-10-02 14:34:52.612994 (karma 1)
             After commenting out `default_sysctls = ...` from
             /usr/share/containers/containers.conf I was able to
             test and verify that this update works. I was pointed
             out to
             https://github.com/containers/podman/issues/7766  I am
             able to run x11 applications again! Ctrl + P also
             works as expected. /media is present, same for udev
             database.
             bodhi - 2020-10-02 14:24:41.395885 (karma 0)
             This update's test gating status has been changed to
             'ignored'.
             bodhi - 2020-10-02 13:56:36.568529 (karma 0)
             This update's test gating status has been changed to
             'waiting'.
             bodhi - 2020-10-02 13:56:36.499889 (karma 0)
             This update's test gating status has been changed to
             'ignored'.
             bodhi - 2020-10-02 13:56:36.193084 (karma 0)
             This update has been submitted for testing by rishi.

  https://bodhi.fedoraproject.org/updates/FEDORA-2020-12c4232ccb


</pre>

In ~/some.html

Then run inside emacs

(xwidget-webkit-browse-url "file://home/USERNAME/some.html") or whatever is the complete path of the file.

pdf-tools issue

First of all, I can't thank you enough for this fork, Emacs not being a native wayland app causes some 'issues'.

Whenenevr I run pdf-view-auto-slice-minor-mode on pdf-tools I get a glitched pdf preview

image

Not only the right third of the image is ill scaled but the lower third is also weird (the text does not repeat Lemma 0.1 thrice).

This started happening when I switched from vanilla emacs 27.0.91 to the pgtk-nativecomp branch of https://github.com/fejfighter/emacs, so it is still possible that this is a native-comp bug.

Remove headerbar in Wayland session?

In Wayland sessions, Emacs gains a very large headerbar at the top. Is there a method to tell Emacs pgtk on Wayland to disable the headerbar?

image

Support for copy image from clipboard

Non-pgtk branch of Emacs supports retrieving the image copied to the clipboard. For example, in telega, I can use telega-chatbuf-attach-clipboard to attach an image I just copied. Another example would be in org-download, which inserts the image in clipboard in an org-mode buffer. However, in pgtk branch, this feature is not supported. An attempt to retrieve an image from the clipboard receives nothing.

Cursor not showing when starting or when refocusing Emacs

When opening emacs, the mouse cursor is invisible. I have to manually unfocus and refocus the window to get it to appear. I must do this using my keyboard however -- clicking on emacs with my mouse does not make the cursor reappear.

This issue also sometimes occurs when I click another window with my mouse while emacs is open. I am once again forced to refocus emacs using my keyboard as clicking keeps the cursor hidden.


I built Emacs through an aur package https://github.com/flatwhatson/emacs#branch=pgtk-nativecomp which just yesterday updated to this repo's latest commit.

I am using Arch Linux with LightDM and i3.

This does not occur on the non-pgtk branches (not on 27.1 nor on native-comp).

I have also seen the same issue on my manjaro i3 PC, and I have had at least one other person who uses Arch and i3 confirm that they have the same problem.

keychords do not work

key-chord (Melpa) does not work in emacs-native-comp-git-enhanced-28.0.50.146273-1-x86_64.pkg.tar.xz. Functions correctly in the non-enhanced version.

Try to rebase instead of merging

It would be great if you rebase your branch on master instead of merging all the time.
This avoids the merge messages and keeps the history clean.

AltGr (dead keys) display an error in main buffers and is not usable in minibuffer

After recent changes in the masm11/emacs branch, dead keys produced by the AltGr key are now properly supported in Emacs buffers. To use the same example from issue #43, when running emacs -Q, typing ´ a will correctly insert á into an Emacs buffer. However, there is still a problem here: ´ on my keyboard is produced with the help of the AltGr key. In the interval between typing ´ and typing a, the warning <65406> is undefined will appear in the minibuffer.

This warning does not affect operation in main buffers. However, input using the AltGr key is completely impossible in the minibuffer, for example, when I search with Ctrl + s. When the minibuffer prompts for input with I-search:, if I type the AltGr key, the warning <65406> is undefined is shown and the minibuffer immediately closes before I am able to type another key.

X-widget: Buffer is not being re-displayed

Same setup of opening a file with xwidget as the previous two bugs. This time around run counsel-M-x to extend the buffer and the xwidget buffer will not be re displayed after quiting counsel-M-x.

Steps to reproduce:

With the following .emacs file

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))

(use-package counsel
  :ensure t)
  • Open a xwidget as (xwidget-webkit-browse-url "file://home/USERNAME/some.html")
  • Run counsel-M-x
  • Press C-g to cancel counsel

The counsel minibuffer should disappear and the xwidget should be re displayed, see screencast below.

Screencast from 10-16-2020 12:37:40 PM.zip

Plans to implement GTK accessibility API

Are there any plans to implement GTK's accessibility API, namely AT-SPI/ATK as of GNOME3 and/or the upcoming new accessibility APIs coming in GNOME 40/GTK 4?
It would allow to use Emacs with Orca screen reader and create a fantastic work environment for screen reader users. There are currently Emacspeak and speechd-el packages, but making Emacs working well with Orca could be a very welcoem thing.
Here are the thing to consider from the usability standpoints:

  • Assign proper roles to widgets so that Orca can get the widget tree,
  • Keep proper names of widgets - the shortter the better, but Emacs is quite good in taht respect already,
  • Expose widget state information such as checked, selected, disabled, enabled,
  • Buffers should allow for accessing character offsets information, which again in case of Emacs is at its core,

Just a few words for a good start...

Clipboard not working with other apps when launched with systemd after reboot

I have systemctl enable --user emacs.
This happens only when I reboot my system,

  • Open a new client with emacsclient -c -n.
  • Yank some text from Emacs(GdkWaylandDisplay) and try to paste in Firefox(wayland), nothing happend. (vice versa)

If I do systemctl restart --user emacs or open a new Emacs instance, then it(copy/paste) works fine.

Compiled with --with-pgtk --with-cairo --with-modules --with-native-compilation,
and the last commit is emacs-mirror@5b97b98

emacs-native-comp-git-enhanced - hyper key definitions do not work

I define my spacebar as a hyper key through a combination of xcape and xmodmap. They work in the non-enhanced version in aur, but do not seem to register at all in the enhanced version.

Running KDE on X on Arch and the three hyper keys defined in sxhkd still work e.g. hyper-d for rofi is fine. I use sxhkd as plasma does not support hyper as a modifier.

I was trying to get emacs-webkit to work and the author suggested I post here.

PGTK makes emacs subject to GTK/GDK scaling breaking some ui elements

When using Emacs with feature/pgtk, it is subject to the DPI scaling of GTK/GDK. This can break come UI elements.

I noticed the following ui elements broke:

  • icons that should not scale at all or not to this size
  • mode-line (gets to big, simple-mode-line active with powerline theme)

Screenshot_20201222_054349

menu-bar-mode freezes emacs

In emacs -Q using the function M-x menu-bar-mode freezes Emacs. Resizing or moving the the frame hides the menu as intenteded and unfreezes Emacs.

To reproduce this bug the emacs window has to be maximized by pressing doble left-click on the title bar of the app (where it says emacs@host), this happens in GNOME 3.36. This does not happen when the window is in its default size.

A similar, probably related, freeze happens when running M-x toggle-frame-maximized. To unfreeze and resize the frame, move the cursor to the activities hot corner, or press the windows key.

Blurry preview-latex, display-pixel-width returns number of pixels after scaling

I'm using swaywm with high DPI scaling (output DP-1 mode 3840x2160 scale 2 position 0,0) and LaTeX previews are blurry (see image). I tracked down the problem to preview-get-geometry function in auctex/preview.el file, which uses results of display-pixel-width and display-mm-width to calculate the DPI and set the resolution of generated previews (command line arguments for ghostscript/dvipng). For my case display-pixel-width returns value of 1920 (3840/2), whereas running under X server it returns the actual number of pixels - 3840.

Does the pgtk fork provide any facility to retrieve the actual, unscaled number of pixels or DPI directly? What would be the preferred and clean way to fix this issue?

No icon window available

I have no idea why this is happening can't seem to find any info online. I just get this error message 'No icon window available' and it refuses to launch.

crash by emacsclient

Run emacs on wayland, and do this a few times:

WAYLAND_DISPLAY= ./lib-src/emacsclient -c foo.txt

emacs frequently crashes.

Non-english layout

Without (pgtk-use-im-context t) I couldn't input russian characters, only codes like this image

But even with GtkIMContext, as you wrote in the readme, keys with modifiers still handled by emacs, and that way tools like https://github.com/a13/reverse-im.el doesn't work properly, so is there some way to fix it?

GTK Error on childframes

When running the following snippet

(display-buffer-in-child-frame (elt (buffer-list) 1)
                               '((child-frame-parameters . (
                                                            (left . 0.7)
                                                            (top . 0.7)
                                                            (width . 0.3)
                                                            (height . 0.5)
                                                            ))))

On an Emacs instance launched from the terminal I get the following error

 (emacs:95118): Gtk-CRITICAL **: 23:26:37.707: gtk_widget_get_allocation: assertion 'GTK_IS_WIDGET (widget)' failed

As far as I am concerned the script runs just fine, but something in the pgtk implementation of childframes is making that error.

Enviroment

Fedora Silverblue 33
GNOME 3.38
Wayland

How to reproduce

  • Launch emacs from the terminal $ emacs
  • Open two buffers (I am not sure if this is needed) This is not needed
  • In one run the snippet mentioned above

Note: Due to a toolbox bug on Fedora 33 I am unable to test non pgtk builds of emacs. Without this fork it would be impossible to use emacs inside a toolbox container 🎊 . this also means that I am not able to test how it behaves in upstream Emacs.

Touchscreen input support?

Emacs doesn't seem to register touch input at all when running the pgtk backend - is this intended? I think it worked on the old x11-only version (maybe because it treated it the same as mouse input?). Would it be possible to fix this? I'm more than happy to test/try things out (I have a couple devices with touchscreens to test on), I was mainly hoping touch input could just be treated like mouse input again but if gtk3 allows differentiating the two, maybe stuff like touch scrolling could be possible!

Also, is this the right place to report issues? Since feature/pgtk seems to be merged upstream should I report upstream instead?

Thanks for all of your work!

X-widget crash

When using xwidget to read email I get

Fatal error 11: Segmentation fault
Backtrace:
emacs[0x507831]
emacs[0x4253a0]
emacs[0x425d98]
emacs[0x62be31]
/lib64/libjavascriptcoregtk-4.0.so.18(+0x13bf95a)[0x7fd1ba1e495a]
/lib64/libpthread.so.0(+0x141e0)[0x7fd1b88e21e0]
/lib64/libc.so.6(+0x1625b5)[0x7fd1b6c525b5]
emacs[0x5e96e9]
/var/home/deathwish/.config/emacs/.local/cache/eln/28.0.50-x86_64-redhat-linux-gnu-d299cfd6d93a84d46b4eab5ce8de0072/xwidget-f9c86f6983804058a6bbecb811090bde-67a3940b0a98748a2d39ca31a2bfe13d.eln(F787769646765742d7765626b69742d63616c6c6261636b_xwidget_webkit_callback_0+0xd9)[0x7fd1a9c66cd9]
emacs[0x575750]
/var/home/deathwish/.config/emacs/.local/cache/eln/28.0.50-x86_64-redhat-linux-gnu-d299cfd6d93a84d46b4eab5ce8de0072/xwidget-f9c86f6983804058a6bbecb811090bde-67a3940b0a98748a2d39ca31a2bfe13d.eln(F787769646765742d6576656e742d68616e646c6572_xwidget_event_handler_0+0xee)[0x7fd1a9c66bee]
emacs[0x575750]
emacs[0x5757a5]
emacs[0x575750]
emacs[0x575d79]
emacs[0x579b38]
/usr/bin/../lib64/emacs/28.0.50/native-lisp/28.0.50-x86_64-redhat-linux-gnu-d299cfd6d93a84d46b4eab5ce8de0072/simple-5a237ebf745e70a3e39e2b91d2f7a105-30d32e2e4732134b53f3c96b7b1f1bf8.eln(F636f6d6d616e642d65786563757465_command_execute_0+0x251)[0x7fd1b18667a1]
emacs[0x575750]
emacs[0x4f5d2b]
emacs[0x572717]
emacs[0x4efe84]
emacs[0x572659]
emacs[0x4f1153]
emacs[0x63e74f]
emacs[0x4f5847]
emacs[0x42ef19]
/lib64/libc.so.6(__libc_start_main+0xf2)[0x7fd1b6b181a2]
emacs[0x43112e]
Segmentation fault (core dumped)

The function is mu4e-action-view-with-xwidget defined as

(defun mu4e-action-view-with-xwidget (msg)
  "View the body of MSG inside xwidget-webkit.
This is only available in Emacs 25+; also see the discussion of
privacy aspects in `(mu4e) Displaying rich-text messages'."
  (unless (fboundp 'xwidget-webkit-browse-url)
    (mu4e-error "No xwidget support available"))
  (xwidget-webkit-browse-url
   (concat "file://" (mu4e~write-body-to-html msg)) t))

I will try to produce a html file to reproduce this only using (xwidget-webkit-browse-url "file://somefile") during the week.

X-Widget: instance with invalid (NULL) class pointer

When Running the exact same file as described in #71, Closing the buffer via kill-buffer yields en error (aditionally to the error seen in #71)

(emacs:151415): GLib-GObject-WARNING **: 12:18:44.591: instance with invalid (NULL) class pointer

(emacs:151415): GLib-GObject-CRITICAL **: 12:18:44.591: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

Note: I will test later if these bugs are reproducible in the master branch of Emacs.

Childframes offset incorrectly

Childframes, like those created by company-box are offset incorrectly, so far to the left that they are off the Emacs window.
image

The childframes appear to be offset based on the global amount, instead of relative to the Emacs window.

OpenSUSE Tumbleweed
X11, KDE 5.19.4
GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, cairo version 1.16.0)
Doom Emacs commit a8b7c00426edd76ba7f5269403fcdf8eb2c56a30
Company-Box commit 20384f0e382c063173b9d863344b1b23bc1e4954

Ligatures support

Ligatures do not render when using emacs pgtk

emacs pgtk
For comparison, here it is how it render using emacs vanilla (a bit blurry because of xwayland's scaling).
emacs vanilla

How to reproduce

  • Set a font with ligature support (e.g. FiraCode or Cascadia Code)
  • install ligature.el and configure it (the default config provided in the README should be enough)

My environment

archlinux
gtk3 3.24.23
cairo 1.17.2
harfbuzz 2.7.2
sway 1.5.1

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.