all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Mention mouse-face changes mouse pointer shape
@ 2007-02-22 13:34 Lennart Borgman (gmail)
  2007-02-22 15:05 ` Jason Rumney
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman (gmail) @ 2007-02-22 13:34 UTC (permalink / raw)
  To: Emacs Devel

The 'mouse-face text property changes the mouse pointer shape to a hand, 
at least on w32. Should not this be mentioned, for example in

   (info "(elisp) Pointer Shape")
   (info "(elisp) Special Properties")

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Mention mouse-face changes mouse pointer shape
  2007-02-22 13:34 Mention mouse-face changes mouse pointer shape Lennart Borgman (gmail)
@ 2007-02-22 15:05 ` Jason Rumney
  2007-02-22 16:23   ` Drew Adams
  2007-02-22 17:24   ` Kim F. Storm
  0 siblings, 2 replies; 10+ messages in thread
From: Jason Rumney @ 2007-02-22 15:05 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

Lennart Borgman (gmail) wrote:
> The 'mouse-face text property changes the mouse pointer shape to a 
> hand, at least on w32. Should not this be mentioned, for example in
>
>   (info "(elisp) Pointer Shape")
>   (info "(elisp) Special Properties")

It seems the change was made immediately in response to the following 
comment in a discussion about implementing mouse-face in header and mode 
lines:
http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg01268.html

    >/ I've implemented mouse-face on mode-line./
    >

    This looks nice!

    But shouldn't the cursor change to a hand cursor rather than an arrow
    cursor when hoovering over a mouse-face?



I think the change was a mistake, instead we should have arranged the 
relevant areas to have both mouse-face and pointer text properties. But 
I don't know how much effort it will be now to go back and change this.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Mention mouse-face changes mouse pointer shape
  2007-02-22 15:05 ` Jason Rumney
@ 2007-02-22 16:23   ` Drew Adams
  2007-02-22 16:35     ` Lennart Borgman (gmail)
  2007-02-22 17:24   ` Kim F. Storm
  1 sibling, 1 reply; 10+ messages in thread
From: Drew Adams @ 2007-02-22 16:23 UTC (permalink / raw)
  To: Emacs Devel

>     But shouldn't the cursor change to a hand cursor rather than an arrow
>     cursor when hoovering over a mouse-face?
>
> I think the change was a mistake, instead we should have arranged the
> relevant areas to have both mouse-face and pointer text properties. But
> I don't know how much effort it will be now to go back and change this.

I haven't followed this thread closely, but this does indeed sound like a
(design) mistake. The two, mouse-face and pointer shape, should be
independent, by default. If some particular code wants to couple them for
some purpose, that's fine, but such a coupling should not be hard-coded or
the default behavior.

The use and the interpretation of these properties should be open, IMO. Code
that uses them should be able to decide what their relation, if any, should
be in any given context.

It is wrong to assume that mouse-face always indicates a link. If it
indicates anything particular a priori, it is only that the mouse can
operate on the text in question somehow, and even that interpretation is not
required. It is also wrong to assume that the finger pointer always
indicates a link. The meaning of each of these two properties is open, by
default, and it makes no sense to hard-couple them.

If some people think that wedding them is helpful in general, then we could
have an option that does that. But 1) the default value of the option should
not couple them, and 2) even if generally coupled by the non-default option
value, this coupling should be easily overridable in any given context.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Mention mouse-face changes mouse pointer shape
  2007-02-22 16:23   ` Drew Adams
@ 2007-02-22 16:35     ` Lennart Borgman (gmail)
  2007-02-22 16:54       ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman (gmail) @ 2007-02-22 16:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: Emacs Devel

Drew Adams wrote:
>>     But shouldn't the cursor change to a hand cursor rather than an arrow
>>     cursor when hoovering over a mouse-face?
>>
>> I think the change was a mistake, instead we should have arranged the
>> relevant areas to have both mouse-face and pointer text properties. But
>> I don't know how much effort it will be now to go back and change this.
> 
> I haven't followed this thread closely, but this does indeed sound like a
> (design) mistake. The two, mouse-face and pointer shape, should be
> independent, by default. If some particular code wants to couple them for
> some purpose, that's fine, but such a coupling should not be hard-coded or
> the default behavior.


Something like 'mouse-face, 'mouse-link-face, 'mouse-pointer with 
appropirate priorities?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Mention mouse-face changes mouse pointer shape
  2007-02-22 16:35     ` Lennart Borgman (gmail)
@ 2007-02-22 16:54       ` Drew Adams
  0 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2007-02-22 16:54 UTC (permalink / raw)
  To: Emacs Devel

> >>     But shouldn't the cursor change to a hand cursor rather
> >>     than an arrow cursor when hoovering over a mouse-face?
> >>
> >> I think the change was a mistake, instead we should have arranged the
> >> relevant areas to have both mouse-face and pointer text properties. But
> >> I don't know how much effort it will be now to go back and change this.
> >
> > I haven't followed this thread closely, but this does indeed
> > sound like a (design) mistake. The two, mouse-face and pointer
> > shape, should be independent, by default. If some particular code
> > wants to couple them for some purpose, that's fine, but such a
> > coupling should not be hard-coded or the default behavior.
>
> Something like 'mouse-face, 'mouse-link-face, 'mouse-pointer with
> appropirate priorities?

I don't know what you're proposing concretely, but any such proposals should
be discussed after the release.

I might have misunderstood, but I interpreted Jason's message to say that
these two properties are now coupled generally, instead of them both just
having been applied to the "relevant mode line areas". Perhaps the coupling
is not so general, and is limited to the mode line as a whole, but the same
argument still applies: they should be coupled only as needed, as particular
code sees fit.

My point was that, if these two properties are now coupled in a general way,
then that is a mistake. That would represent a change from the traditional
behavior, apparently slipped in as a bug fix, and it should be pulled out,
IMO. That's all I meant to say.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Mention mouse-face changes mouse pointer shape
  2007-02-22 15:05 ` Jason Rumney
  2007-02-22 16:23   ` Drew Adams
@ 2007-02-22 17:24   ` Kim F. Storm
  2007-02-22 17:33     ` Jason Rumney
  2007-02-22 17:42     ` Drew Adams
  1 sibling, 2 replies; 10+ messages in thread
From: Kim F. Storm @ 2007-02-22 17:24 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Lennart Borgman (gmail), Emacs Devel

Jason Rumney <jasonr@gnu.org> writes:

>> The 'mouse-face text property changes the mouse pointer shape to a
>> hand, at least on w32. Should not this be mentioned, for example in
>>
> I think the change was a mistake, instead we should have arranged the
> relevant areas to have both mouse-face and pointer text
> properties. But I don't know how much effort it will be now to go back
> and change this.

Maybe it was a mistake, but in most cases, I think a hand cursor is
the right pointer shape for mouse-face.  If necessary, a pointer
property can still be used to select another cursor shape.

If not, that's a bug we should fix.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Mention mouse-face changes mouse pointer shape
  2007-02-22 17:24   ` Kim F. Storm
@ 2007-02-22 17:33     ` Jason Rumney
  2007-02-22 17:44       ` Lennart Borgman (gmail)
  2007-02-22 17:42     ` Drew Adams
  1 sibling, 1 reply; 10+ messages in thread
From: Jason Rumney @ 2007-02-22 17:33 UTC (permalink / raw)
  To: Kim F. Storm; +Cc: Lennart Borgman (gmail), Emacs Devel

Kim F. Storm wrote:
> If necessary, a pointer property can still be used to select another 
> cursor shape.

You are right. It can.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Mention mouse-face changes mouse pointer shape
  2007-02-22 17:24   ` Kim F. Storm
  2007-02-22 17:33     ` Jason Rumney
@ 2007-02-22 17:42     ` Drew Adams
  2007-02-22 19:42       ` Jason Rumney
  1 sibling, 1 reply; 10+ messages in thread
From: Drew Adams @ 2007-02-22 17:42 UTC (permalink / raw)
  To: Emacs Devel

> >> The 'mouse-face text property changes the mouse pointer shape to a
> >> hand, at least on w32. Should not this be mentioned, for example in
> >>
> > I think the change was a mistake, instead we should have arranged the
> > relevant areas to have both mouse-face and pointer text
> > properties. But I don't know how much effort it will be now to go back
> > and change this.
>
> Maybe it was a mistake, but in most cases, I think a hand cursor is
> the right pointer shape for mouse-face.  If necessary, a pointer
> property can still be used to select another cursor shape.

IOW, you think the mouse-face and finger pointer should be coupled, by
default. And code that wants a different behavior would then override this
default behavior.

That's a design change that wasn't really discussed, AFAIK. I prefer the two
to be uncoupled by default. Why don't we discuss this after the release, and
revert this change now?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Mention mouse-face changes mouse pointer shape
  2007-02-22 17:33     ` Jason Rumney
@ 2007-02-22 17:44       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 10+ messages in thread
From: Lennart Borgman (gmail) @ 2007-02-22 17:44 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Emacs Devel, Kim F. Storm

Jason Rumney wrote:
> Kim F. Storm wrote:
>> If necessary, a pointer property can still be used to select another 
>> cursor shape.
> 
> You are right. It can.


Fine. Then it looks like it should suffice to document the current 
behaviour, maybe at those places I pointed to?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Mention mouse-face changes mouse pointer shape
  2007-02-22 17:42     ` Drew Adams
@ 2007-02-22 19:42       ` Jason Rumney
  0 siblings, 0 replies; 10+ messages in thread
From: Jason Rumney @ 2007-02-22 19:42 UTC (permalink / raw)
  To: Drew Adams; +Cc: Emacs Devel

Drew Adams wrote:
> That's a design change that wasn't really discussed, AFAIK. I prefer the two
> to be uncoupled by default. Why don't we discuss this after the release, and
> revert this change now?
>   
It has been this way for 2 years now. We don't know how much code has 
come to rely on the current behaviour.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-02-22 19:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-22 13:34 Mention mouse-face changes mouse pointer shape Lennart Borgman (gmail)
2007-02-22 15:05 ` Jason Rumney
2007-02-22 16:23   ` Drew Adams
2007-02-22 16:35     ` Lennart Borgman (gmail)
2007-02-22 16:54       ` Drew Adams
2007-02-22 17:24   ` Kim F. Storm
2007-02-22 17:33     ` Jason Rumney
2007-02-22 17:44       ` Lennart Borgman (gmail)
2007-02-22 17:42     ` Drew Adams
2007-02-22 19:42       ` Jason Rumney

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.