bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65886: 29.1; pgtk emacs should assume --no-window-system when there


From: Po Lu
Subject: bug#65886: 29.1; pgtk emacs should assume --no-window-system when there is no window system
Date: Tue, 12 Sep 2023 15:43:59 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

"Trent W. Buck" <trentbuck@gmail.com> writes:

> What I actually want is for "git mergetool" to open emacs in my terminal, not 
> popup a GUI window.
> Because teaching /usr/lib/git-core/mergetools/emerge to (sometimes!) pass 
> "-nw" to emacs seemed fiddly,
> I used to achieve this via a quick-and-dirty hack:
>
>     DISPLAY= git mergetool
>
> Right now this doesn't work in my pgtk emacs:
>
>     bash5$ DISPLAY= WAYLAND_DISPLAY= emacs -Q
>
>     (emacs:3064023): Gtk-WARNING **: 14:59:49.225: cannot open display: 
>
>     bash5$ env -i TERM="$TERM" emacs -Q
>
>     (emacs:3064224): Gtk-WARNING **: 15:00:32.320: cannot open display: 
>
> If there is no valid GUI and there is a valid terminal,
> I want emacs to open in the terminal -- not to error.

Unfortunately, this isn't possible without employing window system
specific APIs, the avoidance of which served as the impetus for the PGTK
port and still remains one of its principal design objectives.  Refer to
bug#63555, which details both the reason the approach taken by the X
port cannot function under PGTK, and why GDK's own initialization
functions are inadequate.

> Non-pgtk GTK emacs does this, i.e. this is a regression/inconsistency.

This is because here, Emacs knows exactly which GDK backend will be
loaded (X11) and what environment variable to check.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]