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

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 21 Apr 2019 03:07:02 UTC

Severity: minor

Found in version 26.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 35353 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Drew Adams <drew.adams <at> oracle.com>, 35353 <at> debbugs.gnu.org
Subject: Re: bug#35353: 26.2; Buffer *xref*: (1) hard-coded mouse-1, (2) major
 mode name
Date: Mon, 22 Apr 2019 12:24:11 +0300
On 21.04.2019 16:27, Drew Adams wrote:
>> Please respect `mouse-1-click-follows-link'.
> 
> Please contrast what, say, `compile.el' does, which is
> simple and Emacs-conventional:
> 
>   (define-key map [mouse-2]     'compile-goto-error)
>   (define-key map [follow-link] 'mouse-face)
> 
> See (elisp) `Key Binding Conventions':
> 
>   Many special major modes, like Dired, Info, Compilation,
>   and Occur, are designed to handle read-only text that
>   contains "hyper-links".
> 
>   Such a major mode should redefine 'mouse-2' and <RET> to
>                     ^^^^^^^^^^^^^^^^^^^^^^^^^
>   follow the links.  It should also set up a 'follow-link'
>                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   condition, so that the link obeys 'mouse-1-click-follows-link'.
> 
>   *Note Clickable Text::.  *Note Buttons::, for an easy
>   method of implementing such clickable links.
> 
> Each core Emacs developer who defines a major mode with
> clickable links should be familiar with and respect this
> convention.

Thank you for the report.

It's not hard to fix, but it seems to do that we'll have to give mouse-2 
a different binding from what it has now. Which is also a breaking 
change (in Xref).

I'd like to let someone else decide whether this is worth it.




This bug report was last modified 3 years and 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.