* (error "Window system frame should be used")
@ 2017-04-20 21:34 Lars Ingebrigtsen
2017-04-20 21:49 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2017-04-20 21:34 UTC (permalink / raw)
To: emacs-devel
I'm trying to write some tests for `image-size' (in conjunction with
scaling, which has no tests currently, apparently), but ert just says:
Test image-size condition:
(error "Window system frame should be used")
FAILED 1/1 image-size
Ran 1 tests, 0 results as expected, 1 unexpected (2017-04-20 23:29:22+0200)
So I guess in batch mode ... something frame-like has to be set up? Or
something? The error message is a bit unclear; I tried looking for
"window system frame" and came up short...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-20 21:34 (error "Window system frame should be used") Lars Ingebrigtsen
@ 2017-04-20 21:49 ` Lars Ingebrigtsen
2017-04-20 22:50 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2017-04-20 21:49 UTC (permalink / raw)
To: emacs-devel
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Test image-size condition:
> (error "Window system frame should be used")
> FAILED 1/1 image-size
Oh, I see -- it means "(window system) frame", not "window (system
frame)". I wondered why I had never heard of a "system frame" before.
:-)
Can I get a window-system frame when running tests, though? I've
grepped for a couple of minutes through tests, but haven't really found
anything...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-20 21:49 ` Lars Ingebrigtsen
@ 2017-04-20 22:50 ` Lars Ingebrigtsen
2017-04-20 23:22 ` Clément Pit-Claudel
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2017-04-20 22:50 UTC (permalink / raw)
To: emacs-devel
Hm. Is there no way to create a headless Emacs that has window-system
frames? It seems kinda unlikely that we don't have a way to test these
things? Or should I just stick the tests in test/manual?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-20 22:50 ` Lars Ingebrigtsen
@ 2017-04-20 23:22 ` Clément Pit-Claudel
2017-04-21 3:47 ` Eli Zaretskii
2017-04-21 5:28 ` Lars Brinkhoff
2 siblings, 0 replies; 13+ messages in thread
From: Clément Pit-Claudel @ 2017-04-20 23:22 UTC (permalink / raw)
To: emacs-devel
On 2017-04-20 18:50, Lars Ingebrigtsen wrote:
> Hm. Is there no way to create a headless Emacs that has window-system
> frames? It seems kinda unlikely that we don't have a way to test these
> things? Or should I just stick the tests in test/manual?
It's tricky. You can start a daemon, and use a client to connect to it and create a new frame.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-20 22:50 ` Lars Ingebrigtsen
2017-04-20 23:22 ` Clément Pit-Claudel
@ 2017-04-21 3:47 ` Eli Zaretskii
2017-04-21 13:22 ` Stefan Monnier
2017-04-21 5:28 ` Lars Brinkhoff
2 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2017-04-21 3:47 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 21 Apr 2017 00:50:34 +0200
>
> Hm. Is there no way to create a headless Emacs that has window-system
> frames?
No. To do that, Emacs has to use GUI APIs, which need a window-system
window (a.k.a. "frame").
> Or should I just stick the tests in test/manual?
I think that's the only practical choice, yes.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-20 22:50 ` Lars Ingebrigtsen
2017-04-20 23:22 ` Clément Pit-Claudel
2017-04-21 3:47 ` Eli Zaretskii
@ 2017-04-21 5:28 ` Lars Brinkhoff
2017-04-21 7:45 ` Lars Brinkhoff
2017-04-21 17:18 ` Lars Ingebrigtsen
2 siblings, 2 replies; 13+ messages in thread
From: Lars Brinkhoff @ 2017-04-21 5:28 UTC (permalink / raw)
To: emacs-devel
Lars Ingebrigtsen wrote:
> Hm. Is there no way to create a headless Emacs that has window-system
> frames? It seems kinda unlikely that we don't have a way to test these
> things?
I'm wildly guessing it shouldn't be impossible to create a
stub/shim/mock window system that's available in batch mode.
If someone were interested in looking into this, how would they
reproduce your error?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-21 5:28 ` Lars Brinkhoff
@ 2017-04-21 7:45 ` Lars Brinkhoff
2017-04-21 8:09 ` Eli Zaretskii
2017-04-21 17:18 ` Lars Ingebrigtsen
1 sibling, 1 reply; 13+ messages in thread
From: Lars Brinkhoff @ 2017-04-21 7:45 UTC (permalink / raw)
To: emacs-devel
Lars Brinkhoff wrote:
> Lars Ingebrigtsen wrote:
>> Is there no way to create a headless Emacs that has window-system
>> frames? It seems kinda unlikely that we don't have a way to test
>> these things?
>
> I'm wildly guessing it shouldn't be impossible to create a
> stub/shim/mock window system that's available in batch mode.
I'm noting that "emacs -nw" can make a graphical frame, but "emacs
-batch" can not.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-21 7:45 ` Lars Brinkhoff
@ 2017-04-21 8:09 ` Eli Zaretskii
2017-04-21 8:44 ` Lars Brinkhoff
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2017-04-21 8:09 UTC (permalink / raw)
To: Lars Brinkhoff; +Cc: emacs-devel
> From: Lars Brinkhoff <lars@nocrew.org>
> Date: Fri, 21 Apr 2017 09:45:42 +0200
>
> I'm noting that "emacs -nw" can make a graphical frame, but "emacs
> -batch" can not.
"emacs -nw" can _display_ a GUI frame. In batch sessions, we don't
display anything, because it's a non-interactive invocation. Batch
sessions have a frame of a special type, which is neither a TTY frame
nor a GUI frame.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-21 8:09 ` Eli Zaretskii
@ 2017-04-21 8:44 ` Lars Brinkhoff
2017-04-21 10:51 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Lars Brinkhoff @ 2017-04-21 8:44 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> I'm noting that "emacs -nw" can make a graphical frame, but "emacs
>> -batch" can not.
> "emacs -nw" can _display_ a GUI frame. In batch sessions, we don't
> display anything, because it's a non-interactive invocation. Batch
> sessions have a frame of a special type, which is neither a TTY frame
> nor a GUI frame.
It's interesting to try. In non-interactive mode, `make-frame' crashes
with "I/O possible" (receiving a SIGIO I guess) when making a GUI frame,
and segmentation fault when making a TTY frame.
I.e.
emacs -batch -eval "(make-frame '((display . \":0\")))"
emacs -batch -eval "(make-frame '((tty-type . \"xterm\")))"
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-21 8:44 ` Lars Brinkhoff
@ 2017-04-21 10:51 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2017-04-21 10:51 UTC (permalink / raw)
To: Lars Brinkhoff; +Cc: emacs-devel
> From: Lars Brinkhoff <lars@nocrew.org>
> Date: Fri, 21 Apr 2017 10:44:04 +0200
>
> Eli Zaretskii wrote:
> > "emacs -nw" can _display_ a GUI frame. In batch sessions, we don't
> > display anything, because it's a non-interactive invocation. Batch
> > sessions have a frame of a special type, which is neither a TTY frame
> > nor a GUI frame.
>
> It's interesting to try.
"Interesting" as in that Chinese curse? ;-)
> In non-interactive mode, `make-frame' crashes
> with "I/O possible" (receiving a SIGIO I guess) when making a GUI frame,
> and segmentation fault when making a TTY frame.
It won't work without some non-trivial refactoring. And even after
that, some pretty basic stuff will never work.
> emacs -batch -eval "(make-frame '((display . \":0\")))"
> emacs -batch -eval "(make-frame '((tty-type . \"xterm\")))"
The last one doesn't need to crash. Try
emacs -batch -eval "(make-terminal-frame '(()))"
Here, it exits with an error message.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: (error "Window system frame should be used")
2017-04-21 5:28 ` Lars Brinkhoff
2017-04-21 7:45 ` Lars Brinkhoff
@ 2017-04-21 17:18 ` Lars Ingebrigtsen
1 sibling, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2017-04-21 17:18 UTC (permalink / raw)
To: Lars Brinkhoff; +Cc: emacs-devel
Lars Brinkhoff <lars@nocrew.org> writes:
> Lars Ingebrigtsen wrote:
>> Hm. Is there no way to create a headless Emacs that has window-system
>> frames? It seems kinda unlikely that we don't have a way to test these
>> things?
>
> I'm wildly guessing it shouldn't be impossible to create a
> stub/shim/mock window system that's available in batch mode.
>
> If someone were interested in looking into this, how would they
> reproduce your error?
Let's see... I think this is a pretty minimal test case:
[larsi@stories ~]$ emacs -batch --eval "(progn (require 'svg) (image-size (svg-image (svg-create 50 50))))"
Window system frame should be used
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-04-21 17:18 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-20 21:34 (error "Window system frame should be used") Lars Ingebrigtsen
2017-04-20 21:49 ` Lars Ingebrigtsen
2017-04-20 22:50 ` Lars Ingebrigtsen
2017-04-20 23:22 ` Clément Pit-Claudel
2017-04-21 3:47 ` Eli Zaretskii
2017-04-21 13:22 ` Stefan Monnier
2017-04-21 13:34 ` Eli Zaretskii
2017-04-21 5:28 ` Lars Brinkhoff
2017-04-21 7:45 ` Lars Brinkhoff
2017-04-21 8:09 ` Eli Zaretskii
2017-04-21 8:44 ` Lars Brinkhoff
2017-04-21 10:51 ` Eli Zaretskii
2017-04-21 17:18 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.