Subject: bug#35353: 26.2; Buffer *xref*: (1) hard-coded mouse-1, (2) major mode name

From: Drew Adams <[email-masked]>
Date: Mon, 22 Apr 2019 05:23:17 -0700 (PDT)

> > > FWIW, I don't see that as a serious issue in this case.  Feel free to
> > > close as wontfix, if you want.
> >
> > Seriously?  Mouse-2 was the original way to follow
> > links.  And ubiquitously in Emacs users need to be
> > able to set point.  They should be able to do so
> > using `mouse-1'.
> 
> FWIW, I see no important reasons to set point in XREF buffers by
> clicking the mouse.

It's always important to be able to set point by
clicking the mouse.

That's the reason why even when `mouse-1' follows
a link we let users instead set point using `mouse-1'
by just holding it pressed longer before releasing it.

And it's the reason we have option
`mouse-1-click-follows-link': to let users not have
`mouse-1' follow links with a non-slow click.

And it's the reason the manual establishes the
convention.  As it says (quoted more extensively
earlier):

 Many special major modes, like Dired, Info, Compilation,
 and Occur, are designed to handle read-only text that
 contains "hyper-links".

It is precisely in these contexts - of which buffer
*xref* is one, that it is important to respect option
`mouse-1-click-follows-link'.

That's the point of that passage.  Users need to be
able to follow links, but they also need to be able
to set point.  How they do one or the other is
decided by their individual preference, using option
`mouse-1-click-follows-link'.

And I pointed out in the original report specifically
how the bug is a problem for users with the option nil:

It's impossible to click `mouse-1' anywhere inside the
window to select it, set point, and focus its frame
(unless you can find and click the file line preceding
a boatload of links - and that line might even be
outside the window, in which case you're completely
out of luck).

> > Not to mention that this violates the explicit Emacs
> > convention (cited earlier).
> 
> It doesn't, your citation is not necessarily relevant to the issue at
> hand.

Why do you think so?  I think it is exactly relevant -
see above.

Do you think that buffer *xref* is different in this
regard from Dired, compilation, or Occur buffers?
How so?  These are buffers that are dense with links,
making it important that users can use the mouse not
only to follow links but also to set point.