conda-forge / emacs-feedstock

A conda-smithy repository for emacs.
BSD 3-Clause "New" or "Revised" License
6 stars 16 forks source link

Use GTK toolkit on linux #50

Closed izahn closed 3 years ago

izahn commented 3 years ago

Checklist

This builds emacs using modern toolkit (gtk3), graphics (cairo) and font (harfbuzz) libraries to produce a more full-featured emacs experience on linux.

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

izahn commented 3 years ago

@conda-forge-admin, please rerender

asmeurer commented 3 years ago

I don't really use the GUI emacs on Linux. Which toolkit is used by default? What is the advantage of this over the current behavior?

asmeurer commented 3 years ago

The recipe test only tests emacs -nw. I wonder if it would break on CI if we also added the same test without -nw. Otherwise I don't know if we can actually test that it works without checking manually.

izahn commented 3 years ago

I don't really use the GUI emacs on Linux. Which toolkit is used by default?

gtk is the default according to http://git.savannah.gnu.org/cgit/emacs.git/tree/INSTALL?h=emacs-27 , though I had to specify --with-x-toolkit=gtk3 in order to get it to use that. gtk is pretty much the only modern tookit supported by Emacs -- the others are mostly of historical interest.

What is the advantage of this over the current behavior?

Basically that menus and fonts work and don't look like they came back to haunt us from the 1980's. Here is a quick side-by-side comparison:

emacs_toolkit_comparison

izahn commented 3 years ago

The recipe test only tests emacs -nw. I wonder if it would break on CI if we also added the same test without -nw. Otherwise I don't know if we can actually test that it works without checking manually.

Since this is the status quo with the current X11 GUI it might make sense to consider that issue separately.

asmeurer commented 3 years ago

Since this is the status quo with the current X11 GUI it might make sense to consider that issue separately.

Sure, but I've tried the current GUI on Linux and I know others use it (actually given your screenshots, maybe this isn't true), so I know it works. I would like to confirm that GTK works before merging this if it isn't too hard.

All I'm suggesting is to try adding

$PREFIX/bin/emacs -Q --kill --batch

as a test in the recipe. If it works, then that is good. If it doesn't, presumably because of some limitation in the CI being too "headless", then I wouldn't worry about it too much.

Actually, I had thought that -nw bypassed even loading the GUI frameworks, but I remembered wrong https://github.com/conda-forge/emacs-feedstock/issues/11. So it seems even the -nw test passing is a good sign.

Also, have you tested this yourself manually? Is there some way to install the artifact from this PR without merging? I guess we could also just merge it and if something breaks we revert it.

izahn commented 3 years ago

I have to admit that I'm new to conda packaging, and I haven't been able to get build-locally.py to work on my machine. It might have something to do with using podman in place of docker, but anyway I haven't been able to run all the tests locally.

Should I add $PREFIX/bin/emacs -Q --kill --batch to the tests and push it here to let the CI test it?

I did build it in a podman container running linux-anvil-comp7:latest and manually tested it there. I also uploaded the package to https://anaconda.org/izahn/emacs-gtk. I've been using it all afternoon without any problems, though admittedly in a conda environment with a bunch of other stuff already installed.

asmeurer commented 3 years ago

Should I add $PREFIX/bin/emacs -Q --kill --batch to the tests and push it here to let the CI test it?

Yeah push up a commit and see what happens on the CI.

izahn commented 3 years ago

It looks like the CI tests all passed. I've done a few more manual tests using https://anaconda.org/izahn/emacs-gtk and everything seems to work as expected.

asmeurer commented 3 years ago

OK. I'm going to merge this. If something breaks, we can open a new PR to fix it.