[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12872: 24.2; Provide a feature to trigger mode-line redisplay
From: |
Eli Zaretskii |
Subject: |
bug#12872: 24.2; Provide a feature to trigger mode-line redisplay |
Date: |
Mon, 12 Nov 2012 21:46:26 +0200 |
> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: <12872@debbugs.gnu.org>
> Date: Mon, 12 Nov 2012 11:07:11 -0800
>
> > Would it be good enough to redisplay whenever point moves, and let
> > your code you run from :eval decide whether the text on the mode line
> > needs to be changed? I think this will be a more general solution.
>
> Yes, it would be good enough.
>
> But the advantage that I'm supposing %l has is that the line-counting is done
> in
> C, as part of the display engine.
What do you need the line number for, in your code? If you need it
today, you are probably already calling something like what-line,
because the mode line itself doesn't give you the line number back,
right? You are aware that under certain conditions, the mode line can
be redisplayed although point didn't move at all?
> If my code had to check whether the line has changed then it would do that in
> Lisp. Not saying that's a big deal. But it still looks to me like the %l
> triggering is convenient.
Yes, but you want to be independent of it, i.e. even when %l is not in
the mode line format.
> Perhaps the option could handle both cases: the general point-change case and
> the more particular line-change case, depending on the option value?
We could do that, yes.
> BTW, why would this be a user option, rather than just a variable that code
> can
> bind? The use case for users is not too clear to me.
Yes, a variable sounds better.
> Anyway, I don't have much to say about what should be done for this
> enhancement.
Some wizardry with flags that control which redisplay optimizations
can be used.