unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately
@ 2010-04-11 20:03 Lennart Borgman
  2010-04-11 20:56 ` Stefan Monnier
  2014-02-06  0:26 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Lennart Borgman @ 2010-04-11 20:03 UTC (permalink / raw)
  To: 5931

Which can lead to some problems. Could we please just stop this timer
when turning off blink-cursor-mode?

Just add a line like

      (when (timerp blink-cursor-timer) (cancel-timer blink-cursor-timer))







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

* bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately
  2010-04-11 20:03 bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately Lennart Borgman
@ 2010-04-11 20:56 ` Stefan Monnier
  2010-05-04  0:30   ` Lennart Borgman
  2014-02-06  0:26 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-04-11 20:56 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5931

> Which can lead to some problems.

Could you give us some details of the kinds of problem you encountered?

> Could we please just stop this timer
> when turning off blink-cursor-mode?
> Just add a line like
>       (when (timerp blink-cursor-timer) (cancel-timer blink-cursor-timer))

I'd rather call blink-cursor-end, then.
And yes, that would seem like a good idea.  But I'd still like to know
why you think it's important enough.


        Stefan







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

* bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately
  2010-04-11 20:56 ` Stefan Monnier
@ 2010-05-04  0:30   ` Lennart Borgman
  0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman @ 2010-05-04  0:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5931

On Sun, Apr 11, 2010 at 10:56 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> Which can lead to some problems.
>
> Could you give us some details of the kinds of problem you encountered?
>
>> Could we please just stop this timer
>> when turning off blink-cursor-mode?
>> Just add a line like
>>       (when (timerp blink-cursor-timer) (cancel-timer blink-cursor-timer))
>
> I'd rather call blink-cursor-end, then.
> And yes, that would seem like a good idea.  But I'd still like to know
> why you think it's important enough.


Perhaps it is not very important but I still think it should be done.
I thought I had a reason, but it turned out that calling
blink-cursor-end does not solve the problem I see.

I see a strange problem where I believe I cancel a timer, but it
somehow survives. At the moment I have no other way to reproduce it
then the example below.

I have a minor mode called h-needed-mode in the package nXhtml. This
try to highlight the current line (and optionally column) when it is
needed. To see the problem do like this:

- set hl-need-mark-column to nil (I have forgotten to change the default)
- set hl-needed-flash-duration to 0.5 (not sure this is needed but
that is what I have)
- turn on hl-needed-mode
- turn on blink-cursor-mode
- visit an elisp file.
- divide the frame in two windows visiting this file.
- jump between them
- wait until the line is highlighted
- then jump again

Now the cursor should blink faster. Examining the timer lists (use M-x
describe-timers in nXhtml) there is now an entry in timer-list:

    2010-05-04 00:16:19.5 0.65  (`blink-cursor-timer-function' nil)

This should not be there. However this does not happen every time.

There is a few lines in hl-needed.el where I call blink-cursor-mode
and blink-cursor-end.

It looks to me like what is happening is that when blink-cursor-timer
is canceled it somehow survives, maybe because it is a repeating
timer.






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

* bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately
  2010-04-11 20:03 bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately Lennart Borgman
  2010-04-11 20:56 ` Stefan Monnier
@ 2014-02-06  0:26 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-06  0:26 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5931

Lennart Borgman <lennart.borgman@gmail.com> writes:

> Which can lead to some problems. Could we please just stop this timer
> when turning off blink-cursor-mode?
>
> Just add a line like
>
>       (when (timerp blink-cursor-timer) (cancel-timer blink-cursor-timer))

The cursor blinking stuff has been redone lately, so I think this bug
report most likely isn't that relevant any more.  Please reopen if it
is.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

end of thread, other threads:[~2014-02-06  0:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-11 20:03 bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately Lennart Borgman
2010-04-11 20:56 ` Stefan Monnier
2010-05-04  0:30   ` Lennart Borgman
2014-02-06  0:26 ` Lars Ingebrigtsen

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