From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Trent W. Buck" <trentbuck@gmail.com>
Cc: 65886@debbugs.gnu.org
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 [thread overview]
Message-ID: <875y4f96ps.fsf@yahoo.com> (raw)
In-Reply-To: <875y4gt1kj.fsf@gmail.com> (Trent W. Buck's message of "Tue, 12 Sep 2023 15:14:52 +1000")
"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.
next prev parent reply other threads:[~2023-09-12 7:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 5:14 bug#65886: 29.1; pgtk emacs should assume --no-window-system when there is no window system Trent W. Buck
2023-09-12 7:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-09-12 18:02 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y4f96ps.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=65886@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
--cc=trentbuck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).