From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5931@debbugs.gnu.org
Subject: bug#5931: Turning off blink-cursor-mode does not stop blink-cursor-timer immediately
Date: Tue, 4 May 2010 02:30:19 +0200 [thread overview]
Message-ID: <z2ye01d8a51005031730qdd40902br86c04fd89d9ea8ff@mail.gmail.com> (raw)
In-Reply-To: <jwveiilyanz.fsf-monnier+emacs@gnu.org>
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.
next prev parent reply other threads:[~2010-05-04 0:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-02-06 0:26 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=z2ye01d8a51005031730qdd40902br86c04fd89d9ea8ff@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=5931@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.