[Top][All Lists]

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

Re: 27.0.50: How can I test a buffer-local window-configuration-change-h

From: Eli Zaretskii
Subject: Re: 27.0.50: How can I test a buffer-local window-configuration-change-hook in batch mode?
Date: Thu, 24 Oct 2019 17:23:26 +0300

> From: Phil Sainty <address@hidden>
> Date: Thu, 24 Oct 2019 23:50:47 +1300
> How does one write tests for this new behaviour?

I don't think you can.  Redisplay does nothing in batch mode, by

  static void
  redisplay_internal (void)
    /* No redisplay if running in batch mode or frame is not yet fully
       initialized, or redisplay is explicitly turned off by setting
       Vinhibit_redisplay.  */
    if (FRAME_INITIAL_P (SELECTED_FRAME ())  <<<<<<<<<<<<<<<<<<<<<<<
        || !NILP (Vinhibit_redisplay))

In batch mode FRAME_INITIAL_P returns non-zero.

This is not just an optimization: in batch mode important data
structures related to the display engine are not set up, because we
have no device to display on, so trying to enter redisplay will crash
very soon.

It would be a very important and useful feature to add a
pseudo-terminal which would allow invoking display in batch mode and
accessing the results of such a "display" in memory in order to verify
its correctness.  Such a feature would allow us to finally start
adding display tests, something that we sorely need.  So if you (or
anyone else) are interested, working on that would be very welcome,
and as a side effect will make the person who does that an expert on
our display code.  But until this job is done, display-related tests
can only be run interactively.

reply via email to

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