[Top][All Lists]

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

Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e"

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e"
Date: Fri, 06 Nov 2015 16:47:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> - live with the apparent regression, telling users that they should
>> simply be happy to have enjoyed this accident in the past.
> I don't like this alternative.  Redisplay should be correct before it
> is fast.

We agree in general, of course.  But it's always been the case that some
changes require a call to force-mode-line-update.  Notice that 

> Users rightfully expect changes to such variables to have
> effect immediately, so not doing that looks like a bug.  How do you
> explain that, after evaluating (setq line-spacing 1.0) nothing
> happens, but as soon as you type "M-x", the new setting takes effect?

I explain it saying that this variable value is only taken into account
if something is redisplayed.  And the user moves on very happy.

E.g. note how in bug#21835, the lack of redisplay is not a cause for
reporting a bug.  It's just a minor surprise worthy of a "Note" in
passing to the actual problem of how the cursor is displayed.

If you don't like this answer, how 'bout I return the question:

   How do you explain to the user that when he used C-x C-e the display
   was immediately updated, but when I put that same code into his
   hand-made interactive function, it stopped working and started to
   only take effect after something like M-x?

I really can't see why we should hide this weakness of our
redisplay system in the case of C-x C-e.  Either this weakness exists
and the Elisp coder will have to know about it sooner or later, or we
fix it for real.

> This is not the only such variable, there are others.  Adding ad-hoc
> code for each one sounds _really_ hacky.


> I cannot take the other possibilities seriously, and I don't think you
> do, either.

A `set-line-spacing' function, no, but a write-barrier, yes.
We've already had discussions on emacs-devel to add such a generic
feature cheaply, even with patches submitted.

>> > Why should we care about performance of "C-x C-e"?
>> Why not?
> Because it's not performance-critical, and cannot be, ever.

Of course it can be performance critical in keyboard-macros.

>> I just think your addition of force-mode-line-update will be wasted
>> work in 99.9% of the cases, and it will only cover very few of the
>> cases where a force-mode-line-update is needed.
> Please show at least a couple of other cases.

"grep force-mode-line-update" shows it's still needed at tons of
other places.  Adding it in C-x C-e won't help them.


reply via email to

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