From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steve Yegge Newsgroups: gmane.emacs.devel Subject: Re: supporting mouse-entered, mouse-left Date: Fri, 31 Jul 2009 23:04:45 -0700 Message-ID: <9c768dc60907312304i5ec1eae3tf267b1d002cb00cc@mail.gmail.com> References: <9c768dc60907310013o7226f1d5w4cde4c54b03eb474@mail.gmail.com> <0C3F67DE39BD414B9E7D825BA8D1F3F4@us.oracle.com> <87zlakdcic.fsf@uwakimon.sk.tsukuba.ac.jp> <8F83745376C049F683731B07431703F7@us.oracle.com> <9c768dc60907311357t63c725c1sa8d90c74514532f4@mail.gmail.com> <87vdl8ch3v.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001485f54658442f6304700e5038 X-Trace: ger.gmane.org 1249108215 31335 80.91.229.12 (1 Aug 2009 06:30:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2009 06:30:15 +0000 (UTC) Cc: Drew Adams , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 01 08:30:07 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MX86Y-00056c-B0 for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2009 08:30:07 +0200 Original-Received: from localhost ([127.0.0.1]:45333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX86X-0004fK-Ol for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2009 02:30:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MX7iD-0002d9-6K for emacs-devel@gnu.org; Sat, 01 Aug 2009 02:04:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MX7i7-0002cp-SC for emacs-devel@gnu.org; Sat, 01 Aug 2009 02:04:56 -0400 Original-Received: from [199.232.76.173] (port=58017 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX7i7-0002cm-Il for emacs-devel@gnu.org; Sat, 01 Aug 2009 02:04:51 -0400 Original-Received: from smtp-out.google.com ([216.239.33.17]:63393) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MX7i6-0002lK-HN for emacs-devel@gnu.org; Sat, 01 Aug 2009 02:04:51 -0400 Original-Received: from spaceape7.eur.corp.google.com (spaceape7.eur.corp.google.com [172.28.16.141]) by smtp-out.google.com with ESMTP id n7164m9j009105 for ; Sat, 1 Aug 2009 07:04:48 +0100 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1249106689; bh=ZRwUSPeREOTuPcmwVU/+hG8uVnI=; h=DomainKey-Signature:MIME-Version:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:X-System-Of-Record; b=B qfr9c/P11j8HlzryyQLT3VgkFUgqaGNsJKIlb9Wn/QgZcfGWMtC771tqttfAbsKck2d uM5FXRA1reKjATwuQA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=BXXhhUnm/aS9u6AVhBfzsRJHO29ZIu4QsuJG+UXAve+5bb9rK2RyGbuIX5DKTz8ST E9fNPFZe6JjYQW3KzSXIg== Original-Received: from gxk22 (gxk22.prod.google.com [10.202.11.22]) by spaceape7.eur.corp.google.com with ESMTP id n7164jo8012651 for ; Fri, 31 Jul 2009 23:04:46 -0700 Original-Received: by gxk22 with SMTP id 22so4956166gxk.0 for ; Fri, 31 Jul 2009 23:04:45 -0700 (PDT) Original-Received: by 10.100.119.17 with SMTP id r17mr4568317anc.136.1249106685341; Fri, 31 Jul 2009 23:04:45 -0700 (PDT) In-Reply-To: <87vdl8ch3v.fsf@uwakimon.sk.tsukuba.ac.jp> X-System-Of-Record: true X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sat, 01 Aug 2009 02:27:20 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113504 Archived-At: --001485f54658442f6304700e5038 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Fri, Jul 31, 2009 at 9:07 PM, Stephen J. Turnbull wrote: > Steve Yegge writes: > > > 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, > > Are you being imprecise here? Surely you have already done this > "linking" for other reasons? > I appear to have inadvertently omitted the word "visually". I meant: "My goal is to link together _visually_ all the references to each local variable," But you knew *exactly* what I meant already, based on your first reply. You're just being coy, and it's charming, but it's not fooling us. > > > so they light up when you mouse over any of them. > > Ie, the only problem you are asking about here is to get the motion > event, and run a hook on that? > Aye. > > > I can't use track-mouse, > > *sigh* > +1 > > > or at least I don't think I can, since this feature needs to > > trigger automatically as you move the mouse (from the idle loop). > > Well, even if track-mouse doesn't do exactly what you want, it's not > clear to me that it's unusable. I can think of two interfaces that > might serve: > > (1) a minor mode where a click toggles the highlighting corresponding > to the js2-mode text properties at the point of the click (no > motion tracking needed), and > > (2) a minor mode which is activated by a click (or popup menu > selection), after which you can explicitly use track-mouse until > the next non-motion event or something like that. I don't think > this kind of mouse-tracking would require huge amounts of code for > what you've described, although there are few enough mouse clicks > that you may already be using them all. > No clicks. It's gotta work in unselected windows. Clicks are a deal-breaker. Hell, I've already got it working when point enters an identifier. So clicking the mouse *already works*. No clicks! > > I think you do want some kind of activation, otherwise if any mouse > motion enables the effect we'd have to coin a term "apoplectic fruit > salad". > I'm fine with that term. We can even name the hook after it, for all I care. But this isn't about what I want. It's my users. They *love* this feature in my browser-based code navigation tool. They drool over it. They demand it in Emacs... and who am I to deny them? I'm afraid I don't have that kind of authority. My hands are tied here. So we're just gonna have to implement it. > > If you want to test the "any motion" interface now, XEmacs has > `mode-motion-hook' XEmacs... that's that VIM clone, isn't it? Or was it SlickEdit? In all seriousness, I'd love to go look, but if I'm going to implement this feature in Emacs, I worry that I don't understand any of the legal ramifications of not clean-rooming it. If someone with the initials "rms" OKs it, then I'll look. Otherwise, I'll just take your word for it. At least you've validated the idea that it's useful. -steve --001485f54658442f6304700e5038 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Jul 31, 2009 at 9:07 PM, Stephen J. Turnbull <= stephen@xemacs.org> wro= te:
Steve Yegge writes:

=A0> The mode decorates the source with various text properties to
=A0> facilitate navigation, outlining, folding, etc. =A0My goal is to li= nk
=A0> together all the references to each local variable,

Are you being imprecise here? =A0Surely you have already done this "linking" for other reasons?

I appear to have inadvertentl= y omitted the word "visually".=A0 I meant:

"My goal i= s to link together _visually_ all the references to each local
variable,= "

But you knew *exactly* what I meant already, based on your first
rep= ly.=A0 You're just being coy, and it's charming, but it's not f= ooling us.
=A0

=A0> so they light up when you mouse over any of them.

Ie, the only problem you are asking about here is to get the motion event, and run a hook on that?

Aye.
=A0

=A0> I can't use track-mouse,

*sigh*

+1
=A0

=A0> or at least I don't think I can, since this feature needs to =A0> trigger automatically as you move the mouse (from the idle loop).
Well, even if track-mouse doesn't do exactly what you want, it= 9;s not
clear to me that it's unusable. =A0I can think of two interfaces that might serve:

(1) a minor mode where a click toggles the highlighting corresponding
=A0 =A0to the js2-mode text properties at the point of the click (no
=A0 =A0motion tracking needed), and

(2) a minor mode which is activated by a click (or popup menu
=A0 =A0selection), after which you can explicitly use track-mouse until =A0 =A0the next non-motion event or something like that. =A0I don't th= ink
=A0 =A0this kind of mouse-tracking would require huge amounts of code for<= br> =A0 =A0what you've described, although there are few enough mouse clic= ks
=A0 =A0that you may already be using them all.

No clicks.=A0 It's gotta work in unselected windo= ws.=A0 Clicks are a
deal-breaker.=A0 Hell, I've already got it worki= ng when point enters
an identifier.=A0 So clicking the mouse *already wo= rks*.

No clicks!
=A0

I think you do want some kind of activation, otherwise if any mouse
motion enables the effect we'd have to coin a term "apoplectic fru= it
salad".

I'm fine with that term.=A0 We can even name the = hook after it, for
all I care.=A0 But this isn't about what I want.= =A0 It's my users.=A0 They *love*
this feature in my browser-based c= ode navigation tool.=A0 They drool
over it.=A0 They demand it in Emacs... and who am I to deny them?
I'= m afraid I don't have that kind of authority.=A0 My hands are tied here= .

So we're just gonna have to implement it.
=A0

If you want to test the "any motion" interface now, XEmacs has `mode-motion-hook'

XEmacs... that's that VIM = clone, isn't it?=A0 Or was it SlickEdit?

In all seriousness, I&#= 39;d love to go look, but if I'm going to implement
this feature in = Emacs, I worry that I don't understand any of the
legal ramifications of not clean-rooming it.

If someone with the ini= tials "rms" OKs it, then I'll look.=A0 Otherwise,
I'll= just take your word for it.=A0 At least you've validated the idea
t= hat it's useful.

-steve

--001485f54658442f6304700e5038--