[Top][All Lists]

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

Re: How to make dragging with mouse 1 not do highlighting or marking?

From: Ian Kelling
Subject: Re: How to make dragging with mouse 1 not do highlighting or marking?
Date: Mon, 14 Jan 2013 09:58:36 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/26/2012 06:11 PM, J. David Boyd wrote:
Ian Kelling <> writes:

When I hold down mouse-1 and move it around in a buffer, I just want
the cursor to follow the mouse as I move it. So far, my best guess is
to copy mouse-drag-track function and remove mark related code.

Ian Kelling

Then, why hold down mouse-1?  I mean, the cursor already follow the
mouse around as you move it....

Because I do not want to highlight or select a region. The general idea is to be able to more easily identify exactly which character the mouse pointer would act on.

I've changed what I want a bit, and need some help from the elisp gurus out there. I want the character that the mouse pointer would act on highlighted all the time, not just when I press a button. I was able to get it working when a button was pressed down using mouse.el code as an example (and mouse+.el). However, that code doesn't work in the background so to speak if I try to just run it from my init file.

The critical example from mouse.el is this:

             (while (progn (setq event  (read-event))
                           (or (mouse-movement-p event)
(memq (car-safe event) '(switch-frame select-window))))

How can I run code in which I would update an overlay on all on mouse movement events?

reply via email to

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