From: Ian Kelling <ianowl@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to make dragging with mouse 1 not do highlighting or marking?
Date: Fri, 25 Jan 2013 00:34:28 -0800 [thread overview]
Message-ID: <51024394.5050406@gmail.com> (raw)
In-Reply-To: <87k3rcquf8.fsf@web.de>
On 01/16/2013 08:56 PM, Michael Heerdegen wrote:
> Hi,
>
> I guess you want something like this:
>
>
> (defun my-move-cursor (event)
> "Doc..."
> (interactive "e")
> (mouse-set-point event)
> (let (event ov)
> (track-mouse
> (while (progn
> (setq event (read-event))
> (or (mouse-movement-p event)
> (memq (car-safe event) '(switch-frame select-window))))
> (mouse-set-point event)
> (if ov (move-overlay ov (point) (1+ (point)))
> (setq ov (make-overlay (point) (1+ (point))))
> (overlay-put ov 'face 'match))))
> (when ov (delete-overlay ov))))
>
> (global-set-key [down-mouse-1] #'my-move-cursor)
Yes, that is what I was originally thinking. Thank you. Now I also want an overlay
to follow the mouse cursor when no button is pressed. I'm having a hard time with
it. I'm going to post to the list under a new subject to ask about that.
- Ian
next prev parent reply other threads:[~2013-01-25 8:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 15:45 How to make dragging with mouse 1 not do highlighting or marking? Ian Kelling
2012-12-21 16:58 ` Dmitry Gutov
2012-12-21 17:30 ` Ian Kelling
2012-12-21 20:26 ` Stephen Berman
2012-12-27 2:11 ` J. David Boyd
2013-01-14 17:58 ` Ian Kelling
[not found] ` <mailman.17411.1358186333.855.help-gnu-emacs@gnu.org>
2013-01-17 4:56 ` Michael Heerdegen
2013-01-25 8:34 ` Ian Kelling [this message]
2013-01-25 14:58 ` Ian Kelling
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=51024394.5050406@gmail.com \
--to=ianowl@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.