[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: change cursor type when idle

From: Drew Adams
Subject: RE: change cursor type when idle
Date: Mon, 28 Aug 2006 08:00:00 -0700

    > Another possible (minor) feature to consider for after the
    > release: As an option, let users switch cursor type
    > automatically when Emacs is idle.
    > I've been using this for a while, and I like it. I like a bar
    > cursor for editing, but the bar cursor is hard to locate,
    > when I'm not already looking at it or near it. So, I use an
    > idle timer to change it to a (blinking) box cursor while
    > Emacs is idle. I find this helps quite a bit - without it,
    > it's hard to use a bar cursor, IMO.
    > Users can choose not to use this, and they can toggle it on
    > and off. They can also change the number of seconds to wait
    > before the automatic cursor-type change (2 sec, by default).

    Brilliant idea!  Here's one way to do it.

    If people don't like a blinking cursor normally, they just have
    to define blink-cursor-delay to the same value as

In my own implementation, this feature is separate from whether or not the
cursor should blink, which I think is a little better. I just use a timer
that, if the current cursor type is not `box', saves that type as the
`last-cursor-type', changes the type to `box', and reads an event. When an
event arrives, the same function pushes it to `unread-command-events' and,
if there is a `last-cursor-type', restores that as the current cursor type.

As I mentioned, it's good to also have 1) a toggle for this and 2) make the
whole thing an option.

reply via email to

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