all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steve Yegge <stevey@google.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: "Stephen J. Turnbull" <stephen@xemacs.org>, emacs-devel@gnu.org
Subject: Re: supporting mouse-entered, mouse-left
Date: Fri, 31 Jul 2009 22:52:51 -0700	[thread overview]
Message-ID: <9c768dc60907312252k7bf800b8t453669b2ca2a6067@mail.gmail.com> (raw)
In-Reply-To: <2CD05755045E4C60877DA54CC13E7D9D@us.oracle.com>

[-- Attachment #1: Type: text/plain, Size: 3113 bytes --]

No, I do not need #1.  This is not a question about highlighting.
I most sincerely regret ever using the word "highlight", because
it has sent you off chasing a massive red herring.

Let's just pretend I never said I wanted them to highlight.
I want them to squeak audibly, like mice.  OK?  I will figure out
how to make that happen.  By myself.

My question is #2, and your solution does not work.  Emacs does
not send any notifications when the mouse moves unless track-mouse
is on.  This is what is called, in the vulgar parlance, a Catch-22.

Stefan already understands my question and has given me a
very satisfactory answer, which is, in short:  go ahead and implement
it.  That is what I was hoping to hear.

Before I start, I need to go poke fun at Stephen for acting like
a user on a Mac OS X forum and telling me in great detail that I
don't really want to do what I specifically said I want to do.

-steve

On Fri, Jul 31, 2009 at 5:56 PM, Drew Adams <drew.adams@oracle.com> wrote:

>        The mode decorates the source with various text properties to
>        facilitate navigation, outlining, folding, etc.  My goal is to link
>        together all the references to each local variable, so they light
>        up when you mouse over any of them.
>
> Sounds like you need two things:
>
> 1. A way to highlight all text that has some property with a given value.
> 2. A way to know when the mouse is over any such text.
>
> For #2 I dunno. Maybe you can put something on `post-command-hook' (or you
> might
> need to do mouse-tracking). A function on `post-command-hook' could perhaps
> check whether the last event was a mouse event, and if so get the mouse
> position
> and then the value of the property at that position. That could be costly,
> but
> it might get you started.
>
> For #1, I just added a command to highlight.el that does that. It should
> give
> you something that works while you look for something more appropriate, if
> it
> isn't exactly what you want.
>
> The new command is `hlt-highlight-property-with-value'. You give it the
> property
> and value to highlight. You can give it a list of possible values - if the
> property has any of them, then the text is highlighted.
>
> You can also give it start and end limits, the highlighting face, the
> highlighting type (overlay or text property or both), and whether the
> highlighting should be with property `face' or `mouse-face'. All of these
> args
> are optional.
>
> To test the command:
>
> 1. Add a property to some text. For a quick test, you could add property
> `mouse-face' with value `highlight' (e.g. just as a test) using `C-u M-x
> hlt-highlight-regexp-region'.
>
> 2. Highlight all text that has a given property value. `M-x
> hlt-highlight-property-with-value'. You are prompted for the property and
> the
> value. E.g., enter `mouse-face' for the property and `highlight' for its
> value.
> All text (in the region or buffer) that has property `mouse-face' with
> value
> `highlight' is highlighted. (See the file for how to unhighlight etc.)
>
> http://www.emacswiki.org/emacs/highlight.el
>
> HTH.
>
>

[-- Attachment #2: Type: text/html, Size: 3763 bytes --]

  reply	other threads:[~2009-08-01  5:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31  7:13 supporting mouse-entered, mouse-left Steve Yegge
2009-07-31 15:38 ` Drew Adams
2009-07-31 15:48   ` Steve Yegge
2009-07-31 16:48   ` Stephen J. Turnbull
2009-07-31 16:42     ` Drew Adams
2009-07-31 20:23       ` Drew Adams
2009-07-31 20:57         ` Steve Yegge
2009-08-01  0:56           ` Drew Adams
2009-08-01  5:52             ` Steve Yegge [this message]
2009-08-01  7:26               ` Drew Adams
2009-08-01  4:07           ` Stephen J. Turnbull
2009-08-01  6:04             ` Steve Yegge
2009-08-01  7:18               ` Stephen J. Turnbull
2009-07-31 19:16 ` Stefan Monnier
2009-07-31 22:05   ` Johan Bockgård

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=9c768dc60907312252k7bf800b8t453669b2ca2a6067@mail.gmail.com \
    --to=stevey@google.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=stephen@xemacs.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.