[Top][All Lists]

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

Re: redisplay-dont-pause does not work

From: Eli Zaretskii
Subject: Re: redisplay-dont-pause does not work
Date: Sat, 27 May 2006 14:28:20 +0300

> Date: Sat, 27 May 2006 10:24:39 +0200
> From: Lars Hansen <address@hidden>
> Cc: address@hidden
> Richard Stallman wrote:
> >We could change the code, or change the manual.
> >I am not sure which is better.
> >  
> >
> IMO changing the code is best. Otherwise, IIUC, there is no way one can
> force redisplay from a lisp program.

I think we should define what does ``force redisplay'' mean, before we
decide how to provide such a feature.  Does it mean redisplay
everything (i.e. every window on every frame)?  Or just the current
frame, or maybe just the current window?  (The latter should be
available with "C-l", I think.)  Do we want to let Lisp programs
specify what they want redisplayed, perhaps?

I think after we decide what possible uses could this functionality
have, we should design a suitable Lisp interface to supersede the
sit-for kludge.  (It is a kludge, IMHO, because it doesn't really
force a redisplay, it just enters the Emacs idle loop, which triggers
a redisplay as one of its side effects--_provided_, that is, that
there's no input pending, which is the reason for the need to toggle
redisplay-dont-pause in the first place.)

> Here is an example of the need of a way to force redisplay:
> I have an Emacs lisp program that I use to copy files from one box to
> another. It shows in a buffer the list of files to copy and marks each
> file as it is processed. If I switch away from the Emacs frame and back
> again, the display is no longer updated (except for minibuffer
> messages). Until now I did not know why, but now I see that some window
> manager event stops (sit-for 0) forcing redisplay.

But sit-for was designed precisely for such situations, I think: wait
for some event with a time-out.  The fact that it does a redisplay is
a side effect, not its purpose.  What we need is redisplay-now or some
such, which will explicitly enter the display engine, without any
delays and conditions.

reply via email to

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