unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Removing redisplay-dont-pause
@ 2024-11-17  5:43 Gerd Möllmann
  2024-11-17  7:11 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Möllmann @ 2024-11-17  5:43 UTC (permalink / raw)
  To: Emacs Devel; +Cc: Stefan Monnier

Eli Zaretskii <eliz@gnu.org> writes:

>> branch: scratch/tty-child-frames
>> commit f62d70f52f4f6b7ed158d618bf790df21f171172
>> Author: Gerd Möllmann <gerd@gnu.org>
>> Commit: Gerd Möllmann <gerd@gnu.org>
>>
>>     Don't pause display for pending input
>>
>>     * src/dispnew.c: Remove display_completed, redisplay_dont_pause,
>>     redisplay-dont-pause was declared obsolete in Emacs 24.  Remove anything
>>     checking pending input, change function signatures accordingly, and so
>>     on.
>>
>>     * src/keyboard.c (read_char): Don't use redisplay_dont_pause.
>>     * src/minibuf.c (read_minibuf): Use new function signatures.
>>     * src/xdisp.c: Don't check display_completed. Use new API.
>>
>>     * lisp/subr.el (redisplay-dont-pause): Remove declaration.
>
> I don't think this kind of change is appropriate.  Feature branches
> should not add/remove features not directly related to the feature
> being developed on the branch.  If we want to remove
> redisplay-dont-pause from Emacs (and I'm not yet sure we do), it
> should be discussed on emacs-devel or in a dedicated bug report, not
> silently installed on the branch.

I guess not many know what this is about, so what is this about?

One feature of the old redisplay was that it stopped updating the
display when it detected that input was pending, so that it could
process that input ASAP.

I kept that feature in my redisplay. As a debugging aid, I added
redisplay-dont-pause with which I could turn this feature on and off,
because pausing the display lead to a lot subtle and difficult to debug
bugs.

ISTR that setting redisplay-dont-pause to t became sort of a secret
semi-popular hack. Hyrum's Law in action, I guess. And 13 years ago or
so, the default of redisplay-dont-pause was changed to t by Eli.

10 years ago, Stefan Monnier explained the why

  +  /* Contrary to expectations, a value of "false" can be detrimental to
  +     responsiveness since aborting a redisplay throws away some of the
  +     work already performed.  It's usually more efficient (and gives
  +     more prompt feedback to the user) to let the redisplay terminate,
  +     and just completely skip the next command's redisplay (which is
  +     done regardless of this setting if there's pending input at the
  +     beginning of the next redisplay).  */
  +  redisplay_dont_pause = true;

And finally, Stefan also

  (make-obsolete-variable 'redisplay-dont-pause nil "24.5")

and removed it from the docs.

I've removed that pausing feature in my fork and thought I'd bring that
to master via scratch/tty-child-frames, but apparently that's
controversial for some reason I don't understand, and I reverted that.
And so, here we are.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Removing redisplay-dont-pause
  2024-11-17  5:43 Removing redisplay-dont-pause Gerd Möllmann
@ 2024-11-17  7:11 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-11-17  7:11 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: emacs-devel, monnier

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sun, 17 Nov 2024 06:43:06 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> branch: scratch/tty-child-frames
> >> commit f62d70f52f4f6b7ed158d618bf790df21f171172
> >> Author: Gerd Möllmann <gerd@gnu.org>
> >> Commit: Gerd Möllmann <gerd@gnu.org>
> >>
> >>     Don't pause display for pending input
> >>
> >>     * src/dispnew.c: Remove display_completed, redisplay_dont_pause,
> >>     redisplay-dont-pause was declared obsolete in Emacs 24.  Remove anything
> >>     checking pending input, change function signatures accordingly, and so
> >>     on.
> >>
> >>     * src/keyboard.c (read_char): Don't use redisplay_dont_pause.
> >>     * src/minibuf.c (read_minibuf): Use new function signatures.
> >>     * src/xdisp.c: Don't check display_completed. Use new API.
> >>
> >>     * lisp/subr.el (redisplay-dont-pause): Remove declaration.
> >
> > I don't think this kind of change is appropriate.  Feature branches
> > should not add/remove features not directly related to the feature
> > being developed on the branch.  If we want to remove
> > redisplay-dont-pause from Emacs (and I'm not yet sure we do), it
> > should be discussed on emacs-devel or in a dedicated bug report, not
> > silently installed on the branch.
> 
> I guess not many know what this is about, so what is this about?
> 
> One feature of the old redisplay was that it stopped updating the
> display when it detected that input was pending, so that it could
> process that input ASAP.
> 
> I kept that feature in my redisplay. As a debugging aid, I added
> redisplay-dont-pause with which I could turn this feature on and off,
> because pausing the display lead to a lot subtle and difficult to debug
> bugs.
> 
> ISTR that setting redisplay-dont-pause to t became sort of a secret
> semi-popular hack. Hyrum's Law in action, I guess. And 13 years ago or
> so, the default of redisplay-dont-pause was changed to t by Eli.
> 
> 10 years ago, Stefan Monnier explained the why
> 
>   +  /* Contrary to expectations, a value of "false" can be detrimental to
>   +     responsiveness since aborting a redisplay throws away some of the
>   +     work already performed.  It's usually more efficient (and gives
>   +     more prompt feedback to the user) to let the redisplay terminate,
>   +     and just completely skip the next command's redisplay (which is
>   +     done regardless of this setting if there's pending input at the
>   +     beginning of the next redisplay).  */
>   +  redisplay_dont_pause = true;
> 
> And finally, Stefan also
> 
>   (make-obsolete-variable 'redisplay-dont-pause nil "24.5")
> 
> and removed it from the docs.
> 
> I've removed that pausing feature in my fork and thought I'd bring that
> to master via scratch/tty-child-frames, but apparently that's
> controversial for some reason I don't understand, and I reverted that.
> And so, here we are.

Thanks for the summary.

So what do people think about removing this variable (and the code
supporting it) from Emacs?  In particular, does anyone use that
variable in a non-default nil value?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-17  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-17  5:43 Removing redisplay-dont-pause Gerd Möllmann
2024-11-17  7:11 ` Eli Zaretskii

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).