From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-pretest-bug@gnu.org, monnier@iro.umontreal.ca
Subject: Re: 23.0.50; DISPLAY env var bug on w32?
Date: Mon, 07 Jan 2008 22:32:06 +0100 [thread overview]
Message-ID: <47829A56.2080007@gmail.com> (raw)
In-Reply-To: <uabnhtjlv.fsf@gnu.org>
Eli Zaretskii wrote:
>> Date: Mon, 07 Jan 2008 19:45:42 +0100
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc:
>>
>> PS: I do not know if DISPLAY is normally set on a w32 system
>
> It isn't. DISPLAY is standard on X, but not on other windowing
> systems.
Thanks, Eli, I suspected that is why this/these bugs have not been
discovered before.
I got some problems sending to Emacs bugs earlier today so I am
resending what I tried to send then. (I sent it to devel but it seems
better to have it all here.) In this message I looked through the code
to try to understand what happens on w32.
-------- Original Message --------
Subject: Mail delivery failed: returning message to sender
Date: Mon, 07 Jan 2008 15:23:02 -0500
From: Mail Delivery System <Mailer-Daemon@gnu.org>
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
emacs-pretest-bug@gnu.org
SMTP error from remote mail server after RCPT
TO:<emacs-pretest-bug@gnu.org>:
host fencepost.gnu.org [140.186.70.10]: 550 unknown user
============================
Lennart Borgman (gmail) wrote:
> I can not use emacsclient to open files unless I delete the
environmental variable DISPLAY.
>
> To reproduce the problem do
>
> emacs -Q
> M-x server-mode
>
> Then from the command line try to open a file, for example
>
> emacsclient.exe COPYING
>
> This fails with the message
>
> C:\emacs\u\080104\emacs\bin>emacsclient.exe COPYING
> Waiting for Emacs...
> *ERROR*: Don't know how to create a frame on window system x
It looks like several possible bugs to me. A call from emacsclient leads to
server-process-filter
and since tty-name is nil this calls
server-select-display
In this function there is a check
(equal (frame-parameter (selected-frame) 'display) display))
This fails since (frame-parameter (selected-frame) 'display) returns "".
I would expect it to return "localhost:0.0" in my case. The reason for
this is explained further below.
Now this leads to a call to
make-frame-on-display
which finishes with a line at the bottom saying
(make-frame `((window-system . x) (display . ,display) .
,parameters)))
The correct window-system seems to be 'w32 in my case, since that is
what works inf make-frame. The variable frame-creation-function-alist
used there is
((w32 . x-create-frame-with-faces)
(nil . tty-create-frame-with-faces))
If I use this then the frame actually get the display property
"localhost:0.0" and that is why I believe that this is what it should
have from the beginning. So this is bug 1 here I believe.
But 2 is the hard coded value in the last line of make-frame-on-display.
It looks like window-system should be something different there.
When I try to find out what I see in server-process-filter some lines saying
;; -window-system: Open a new X frame.
((equal "-window-system" arg)
(setq dontkill t)
(setq tty-name 'window-system))
Those are a bit surprising to me since I expect an analogous use of
something called "window-system" throughout the code. Obviously that is
not the case here.
And here I stop speculating because there might be some mistake in the
structure here. Someone who understands this code better than I do can
perhaps see more clearly what is needed.
prev parent reply other threads:[~2008-01-07 21:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 18:45 23.0.50; DISPLAY env var bug on w32? Lennart Borgman (gmail)
2008-01-07 21:03 ` Dan Nicolaescu
2008-01-08 0:28 ` Lennart Borgman (gmail)
2008-01-08 2:58 ` David De La Harpe Golden
2008-01-12 15:51 ` Eli Zaretskii
2008-01-12 15:59 ` Lennart Borgman (gmail)
2008-01-12 16:24 ` Eli Zaretskii
2008-01-12 18:06 ` David Kastrup
2008-01-12 18:11 ` Lennart Borgman (gmail)
2008-01-13 4:17 ` Eli Zaretskii
2008-01-13 4:30 ` Juanma Barranquero
2008-01-13 6:55 ` Eli Zaretskii
2008-01-13 21:41 ` Stefan Monnier
2008-01-14 4:07 ` Eli Zaretskii
2008-01-14 15:04 ` Stefan Monnier
2008-01-14 15:13 ` Jason Rumney
2008-01-14 20:33 ` Eli Zaretskii
2008-01-14 23:19 ` Jason Rumney
2008-01-15 4:11 ` Eli Zaretskii
2008-01-15 22:11 ` Jason Rumney
2008-01-13 4:16 ` Eli Zaretskii
2008-01-07 21:13 ` Robert J. Chassell
2008-01-07 21:23 ` Eli Zaretskii
2008-01-07 21:24 ` Eli Zaretskii
2008-01-07 21:32 ` Lennart Borgman (gmail) [this message]
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=47829A56.2080007@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).