-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
emacs: Switch to lucid as the default toolkit #189543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d985b44 to
66ad4b9
Compare
Because of long standing bugs and stability issues & an uncollaborative upstream there has been talk on the emacs-devel mailing list to switch the default toolkit to Lucid (https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg00752.html). The GTK build also has issues with Xinput2, something that both we and upstream want to enable by default in Emacs 29. This situation has prompted me to use both Lucid an no-toolkit (pure X11) Emacs as a daily driver in recent weeks to evaluate what the advantages/drawbacks are and I have concluded that, at least for me, switching the toolkit to Lucid is strictly an upgrade. It has resulted in better stability (there are far fewer tiny UX issues that are hard to understand/identify) & a snappier UI. On top of that the closure size is reduced by ~10%. In the pure X11 build I noticed some unsharpness around fonts so this is not a good default choice. As with everything there is a cost, and that is uglier (I think most would agree but of course this is subjective) menu bars for those that use them and no GTK scroll bars. For anyone who still wants to use GTK they could of course still choose to do so via the new `emacs-gtk` attribute but I think this is a bad default. A note to Wayland users: This does not affect Wayland compatibility in any way since that will already need a PGTK build variant in the future.
66ad4b9 to
c1861b6
Compare
AndersonTorres
left a comment
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for OfBorg.
Has they already made this decision? I haven't read through all those mails but most of what I read was not about lucid. So isn't it premature a bit? (as of myself I wouldn't want to invest in a gui library that will never support wayland so I will definitely continue using gtk) |
No, upstream haven't changed it yet but I do not think it's premature. Regarding Wayland we will already have to introduce a distinct Pgtk attribute for that when the time comes as the Pgtk build is not to be used with X11 making that entire point moot. The fact is that GTK support for X11 is degrading and upstream no longer cares about X11 and has even gone so far as to suggest to drop X11 entirely. |
|
I'm not against this change, as I experience emacs crashes with the Gtk toolkit from time to time. However, I've a few minor points to consider:
|
I was talking specifically about the "no" toolkit build looking worse than both Lucid and GTK builds (all from Nix).
I just tried this to check the closure size impact which is an increase of 7M. Considering we just saved ~124M by removing GTK this is a drop in the bucket. |
|
I would prefer that we simply expose
|
BTW, reading the issue it seems that this is being considered on GTK5, and PGTK is a strict GTK3 port no? |
Hard to say. Strictly speaking, it's a general problem with Emacs from Nixpkgs when built with the Lucid toolkit. However, given that previously, Lucid Emacs was not built by default (was not present in the binary cache), I'd say it's also related to this PR. |
Given the choices "looks worse but much better stability" and "looks better but crashes" I think the choice should clearly be the former.
As the most active maintainer of Emacs in nixpkgs I know this to be untrue from the bug reports I receive both here and on chat (sometimes in private messages). The daemon mode is a core feature of Emacs, GTK is not (and I'd like to point out that I don't use this myself so I'm not arguing in my own self interest here).
I on the other hand do not expect to switch defaults to the pgtk build any time soon, certainly not within the next couple of years and given how reluctant the GTK upstream is to fix X11 related bugs.
Yes, this is something I wanted to point out as a potential future issue that we can entirely avoid by not relying on GTK where it's not necessary. |
Well, I never had Emacs-GTK crash with me, at least not because GTK itself (most of my crashes that I had with Emacs I remember that I could reproduce in other toolkits too). But I will take your word here.
I could also argue that GTK is a core feature. Most users expect for all of their applications to respect their theme settings (I am talking about the Desktop here, not theming inside Emacs), and the GTK port does (for the vast majority of users at least, since most people have a GTK theme setup) while the Lucid port doesn't.
This is what I meant actually (this is why I said that we will not do this on Emacs 29). I think this will be probably on Emacs 30 or 31 (so from 2 to 4 years), hopefully. === To make it clear, I am not completely against this change, but I still think this is premature. I would prefer that we either:
And why? Because I think familiarity matters too, and if you're switching from other distro and them you found out that the |
My comment about ugly fonts can be ignored, because it was caused by prehistoric content in my |
|
The rebuilds are because of the new politics of building Emacs packages? |
Yes. |
|
OK then. I will merge. |
Any reason for this fast merge? I would like this to at least have more feedback from other members. |
|
I read this comment before posting my comment above. My instance is more that people will start running PGTK in X, specially because PGTK fixes a bunch of long term issues in the GTK3 port (less redrawings, better font rendering, etc.), and this will, I hope, result in bug fixes being done in the PGTK port for X once it became widely available (after Emacs 29 is released). So while I don't expect us switching to PGTK by default in 29, I can see PGTK becoming stable enough in the future that it will be recommended by upstream eventually. |
@thiagokokada i see. my experience with PGTK on X always awful regarding issues with system clipboard. so as long such issues are sorted out I'm all for it. |
|
Why was a such a large rebuild merged directly to master? |
|
I mean, the description doesn't sound like the change needs to hurry so much, so I'd suggest reverting and moving to |
We recently started building Emacs packages on Hydra. Most of these packages are absolutely tiny. |
|
If you merge such a change every few days, it will most likely still be significant. I mean PR #190056 now. Naturally now it's worse than usual and certainly significant, as Hydra builders have been in a very bad shape in the past several days. |
Description of changes
Because of long standing bugs and stability issues & an
uncollaborative upstream there has been talk on the emacs-devel
mailing list to switch the default toolkit to
Lucid (https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg00752.html).
The GTK build also has issues with Xinput2, something that both we and
upstream want to enable by default in Emacs 29.
This situation has prompted me to use both Lucid an no-toolkit (pure X11) Emacs
as a daily driver in recent weeks to evaluate what the
advantages/drawbacks are and I have concluded that, at least for me,
switching the toolkit to Lucid is strictly an upgrade.
It has resulted in better stability (there are far fewer tiny UX
issues that are hard to understand/identify) & a snappier UI.
On top of that the closure size is reduced by ~10%.
In the pure X11 build I noticed some unsharpness around fonts so this
is not a good default choice.
As with everything there is a cost, and that is uglier (I think most
would agree but of course this is subjective) menu bars for
those that use them and no GTK scroll bars.
For anyone who still wants to use GTK they could of course still
choose to do so via the new
emacs-gtkattribute but I think thisis a bad default.
A note to Wayland users:
This does not affect Wayland compatibility in any way since that will
already need a PGTK build variant in the future.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notescc @AndersonTorres @tadfisher @lovek323 @jwiegley
cc @ckiee @thiagokokada