Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908969 - app-editors/emacs-30.0.9999: Please provide a USE flag for --with-pgtk independent of USE=X
Summary: app-editors/emacs-30.0.9999: Please provide a USE flag for --with-pgtk indepe...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-21 17:38 UTC by Martin Väth
Modified: 2023-06-21 19:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2023-06-21 17:38:48 UTC
The current ebuilds for app-editors/emacs:29-vcs and app-editors/emacs:30-vcs set --with-pgtk only with USE=-X.

However, at least emacs-30.0.9999 (I did not try earlier versions) can be compiled with support for pgtk and X simultaneously. It depends then on some environment variable settings whether emacs runs in wayland or X mode. In the latter case, a warning is displayed that emacs *might* crash, but it seems to work fine and is very useful if you are in an X session instead of a wayland session.

Although this can be forced with EXTRA_ECONF=--with-pgtk, I think it would be great to have besides the USE-flags X also some USE-flag for --with-pgtk which can be enabled independently of the X flag. The ebuild might display a warning message if both are enabled as the combination is officially discouraged, but as mentioned above, at least in my setup it works fine if both are enabled.

For users who switch sometimes between X and wayland sessions this would be a very useful feature.
Comment 1 Maciej Barć gentoo-dev 2023-06-21 18:03:42 UTC
I think with USE="gtk" all work in picking a X or wayland backend is "offloaded" to GTK+, so why bother with X UI then?

>	# Emacs supports these window systems:
>	# X11, pure GTK (without X11), or Nextstep (Aqua/Cocoa).
>	# General GUI support is enabled by the "gui" USE flag, then
>	# the window system is selected as follows:
>	#   "aqua" -> Nextstep
>	#   "gtk -X" -> pure GTK
>	#   otherwise -> X11
>	# For X11 there is the further choice of toolkits GTK, Motif,
>	# Athena (Lucid), or no toolkit. They are enabled (in order of
>	# preference) with the "gtk", "motif", "Xaw3d", and "athena" flags.

So a important question here is whether the latest Emacs version runs on X11 when USE="gui -X" is set.
Comment 2 Maciej Barć gentoo-dev 2023-06-21 19:18:44 UTC
> So a important question here is whether the latest Emacs version runs on X11
> when USE="gui -X" is set.

Reportedly it works but is very buggy.
Comment 3 Martin Väth 2023-06-21 19:23:40 UTC
> runs on X11 when USE="gui -X" is set.

I had not tried, because I had not expected it.
However, you are completely right:

app-editor/emacs:30-vcs[gtk X] with EXTRA_ECONF='--with-pgtk'
app-editor/emacs:30-vcs[gtk -X]

behave functionally equivalent.