[Top][All Lists]

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

Re: [PATCH] mouse-1 click follows link

From: Luc Teirlinck
Subject: Re: [PATCH] mouse-1 click follows link
Date: Sat, 30 Oct 2004 19:09:13 -0500 (CDT)

Kim Storm wrote:

   > Hopefully I am misunderstanding this, as it would obviously be
   > disastrous, even for an optional feature.

   Can you elaborate on this?

Yes.  You blindly rebind mouse-1 to mouse-2 without having the
_slightest_ idea what mouse-2 is bound to.  This is reckless and
obviously unacceptable.  It represents a danger to the unsuspecting
user, who will only expect the rebinding for true links.

You expect package authors to adapt to your change, but it is
completely unrealistic to expect all of them to do that.  Most package
authors do not read Emacs devel.  Also, even if by some miracle all
package authors would do that, then this would _still_ not solve the
problem.  The user may upgrade to a new Emacs version without
upgrading all outside packages he uses.

   So far we have identified two examples of this in external packages
   (preview-latex and AUCtex) -- it would be trivial for those to
   add the dont-follow-link property.

It is not only non-trivial but impossible to check all external packages.
I could be wrong, but I have the impression that you did not even
check all uses of the mouse-face property that are included with the
Emacs distribution.

   I think it is better to mark the exceptions, rather than the rule.

I am not sure that they are the exception, if you count uses of the
mouse-face property in the source code, rather than occurrences in
actual Emacs buffers.  But anyway, this is irrelevant, because it
quite simply would be irresponsible to blindly execute some random
command, regardless of whether such a blind execution occurs in 90
percent or .01 percent of the cases.  The danger is too big.

On the other hand, if the behavior only occurs when the text has the
link property, then it only occurs for things somebody has explicitly
checked.  The only thing that can happen for overlooked "true" links
is that mouse-1 sets point instead of following the link.  No real
harm happened and the user can file a bug report.  Eventually all real
links will be accounted for.

Even though only implementing the behavior for text that has been
explicitly given the link property would be a lot better than the
concrete patch you proposed, I still do not believe that it would be
ideal.  Unlike your concrete patch, I believe that it would be
acceptable, but I believe that there _must_ be simpler and better ways
to get the same effect.



reply via email to

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