emacs-devel
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e"
Date: Fri, 06 Nov 2015 17:47:49 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Fri, 06 Nov 2015 10:30:51 -0500
> 
> >> That's always been the case for setting line-spacing.
> > No, it worked correctly before Emacs 24.4, according to my testing.
> 
> Yes, but that was an accident.  I think what you did is add an arbitrary
> hack to paper over this, and I think it'd be better to do it either of:
> - 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.  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?

> - fix it "right".  E.g. add ad-hoc code to redisplay_internal that tries
>   to detect changes to this variable, or add a "write barrier" on that
>   variable, or deprecated the `line-spacing' variable in favor of
>   a `set-line-spacing' function (thus providing the write-barrier), ...

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.

> If you fix this case in the way you did, then I see no reason not to
> go further down that road and just always redisplay all mode-lines, on
> the off-chance that the user set line-spacing, or toggled a minor mode
> variable without calling something like force-mode-line-update, set
> a variable `toto' which happens to be used by one of the (:eval...)
> nodes of the mode-line-format of some of the displayed buffers, ...

I see no reason to go down that road.  I don't think there are any
problems to fix there, and simply redisplaying all mode lines all the
time will have no effect except slowing down Emacs.

> > Why should we care about performance of "C-x C-e"?
> 
> Why not?

Because it's not performance-critical, and cannot be, ever.

> 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.  Then maybe I will
change my mind.

> PS: I even several times found that the "lucky accident" which causes
> the mode-line to be recomputed after things like M-: is a mis-feature
> because it doesn't let me know when a call to force-mode-line-update
> is needed.

I see no way around that, as long as going to minibuffer causes
changes in display, like the menu bar, the tool bar, etc.



reply via email to

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