From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> From: Philipp Stephani <p.stephani2@gmail.com>=
> Date: Sun, 11 Sep 2016 17:37:36 +0000
> Cc: 24372@debbugs.gnu.org
>
>=C2=A0 Using the maximum of blink-cursor-delay and blink-cursor-interva= l
>=C2=A0 effectively removes the user's ability of controlling the de= lay before
>=C2=A0 the cursor starts blinking when Emacs becomes idle, doesn't = it?
>
> Yes. I tried to figure out what the intention of blink-cursor-delay wa= s, but couldn't find anything (the commit
> where it was introduced doesn't provide any motivation). I don'= ;t think that blink-cursor-delay <
> blink-cursor-interval ever makes sense. The other way round (delay >= ; interval) is useful if you want to keep the
> cursor visible for a bit longer after a command.
I don't understand the nature of your difficulty.=C2=A0 blink-cursor-de= lay
is obviously how soon the user want the cursor to start blinking after
Emacs becomes idle.=C2=A0 That is orthogonal to the blink interval, which is in effect once the blinking begins.
>=C2=A0 How about a variant of this below? It uses a fixed limitation fr= om
>=C2=A0 below on the delay, but only for the first blink. (The value 0.2= was
>=C2=A0 found by experimentation, not sure if we need to add yet another=
>=C2=A0 defcustom for that.)
>
> I don't think we should introduce magic numbers or further customi= zation options.
It solves the problem, doesn't it?=C2=A0 I don't mind very much if = it were
a defcustom, I just think no one would want to change it.
>=C2=A0 > I've attached another patch with the change I have in m= ind.
>
>=C2=A0 This has a disadvantage of creating a new timer object each time= ,
>=C2=A0 which I think we'd like to avoid: too much consing. (Also, d= on't you
>=C2=A0 need to set the timer variable to nil when the timer is disabled= ?)
>
> I don't understand - the patch doesn't create any additional t= imers, it only changes the initial delay of the
> idle-timer.
Each time blink-cursor--start-timer or blink-cursor--start-idle-timer
is called, they create a new timer, right?=C2=A0 And your patch makes us
call these functions each time blinking is started or ended, right?
> My patch is identical, except is uses blink-cursor-interval as lower b= ound.
Of course.=C2=A0 That's why I said it's a minor variant.
There's another difference, though: in my patch we only limit the
first argument to run-with-timer/run-with-idle-timer, not the second.
So only the first blink cycle is affected.Doesn't that mean that the adjusted delay is ap= plied only after the first command, but not after subsequent commands?=C2= =A0