GNU bug report logs - #49784
27.2; mouse-2 error with "No cross-reference here"

Previous Next

Package: emacs;

Reported by: Robert Morelli <morelli <at> flux.utah.edu>

Date: Fri, 30 Jul 2021 17:59:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.2

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49784 in the body.
You can then email your comments to 49784 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Fri, 30 Jul 2021 17:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Morelli <morelli <at> flux.utah.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 30 Jul 2021 17:59:02 GMT) Full text and rfc822 format available.

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

From: Robert Morelli <morelli <at> flux.utah.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; mouse-2 error with "No cross-reference here"
Date: Fri, 30 Jul 2021 11:20:52 -0600

This might be related to bug 11174 reported 9 years ago.

To reproduce, bind:
(global-set-key (kbd "<mouse-2>")
(lambda (click)
(interactive "e")))

Then, click with mouse-2 in a *Help* buffer.



In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 
Version 10.14.6 (Build 18G95))
of 2021-03-27 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.2022
System Description: macOS 11.5.1

Recent messages:
Invalid face attribute :background nil [108 times]
Mark set
Invalid face attribute :background nil [2 times]
Saved text until "es on the tabs instead of buffer names.
"
Invalid face attribute :background nil [7 times]
Mark set
Invalid face attribute :background nil
Saving file /Users/robertmorelli/MyCloud/Info/Notes/EmacsNotes.tex...
Wrote /Users/robertmorelli/MyCloud/Info/Notes/EmacsNotes.tex

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER GMP

Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major mode: LaTeX/MPS

Minor modes in effect:
reftex-mode: t
LaTeX-math-mode: t
TeX-PDF-mode: t
TeX-source-correlate-mode: t
shell-dirtrack-mode: t
recentf-mode: t
auto-image-file-mode: t
cua-mode: t
smartparens-global-mode: t
smartparens-mode: t
ivy-mode: t
delete-selection-mode: t
async-bytecomp-package-mode: t
yas-global-mode: t
yas-minor-mode: t
show-paren-mode: t
centaur-tabs-mode: t
override-global-mode: t
global-hl-line-mode: t
cl-old-struct-compat-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
auto-fill-function: yas--auto-fill
visual-line-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils jka-compr
vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs
vc vc-dispatcher project iso-transl apropos smartparens-python python
tramp-sh cus-edit reftex-parse misearch multi-isearch dired
dired-loaddefs tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat parse-time iso8601 time-date ls-lisp format-spec cl-print
debug backtrace swiper eieio-opt speedbar sb-image ezimage dframe
find-func help-fns radix-tree preview reporter desktop frameset
reftex-dcr reftex-auc reftex reftex-loaddefs reftex-vars flyspell ispell
tex-bar tex-buf derived toolbar-x noutline outline font-latex latex
latex-flymake flymake-proc flymake warnings tex-ispell tex-style tex crm
texmathp tex-mode compile shell pcomplete comint ansi-color latexenc
bookmark text-property-search pp tabbar recentf tree-widget wid-edit
image-file cus-start cua-base server cus-load smartparens-latex
smartparens-config smartparens dash ivy delsel colir ivy-overlay ffap
thingatpt helm-config helm-easymenu async-bytecomp async yasnippet paren
edmacro kmacro centaur-tabs centaur-tabs-interactive
centaur-tabs-functions centaur-tabs-elements powerline advice
powerline-separators ring powerline-themes color cl-extra help-mode
use-package diminish bind-key easy-mmode hl-line rx finder-inf pcase
tex-site info package easymenu browse-url url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 635201 45589)
(symbols 48 27237 1)
(strings 32 96564 5767)
(string-bytes 1 2958245)
(vectors 16 48021)
(vector-slots 8 1365874 106042)
(floats 8 2274 1732)
(intervals 56 60570 5359)
(buffers 1000 88))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Fri, 30 Jul 2021 18:10:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Morelli <morelli <at> flux.utah.edu>
Cc: 49784 <at> debbugs.gnu.org
Subject: Re: bug#49784: 27.2; mouse-2 error with "No cross-reference here"
Date: Fri, 30 Jul 2021 20:09:20 +0200
Robert Morelli <morelli <at> flux.utah.edu> writes:

> This might be related to bug 11174 reported 9 years ago.
>
> To reproduce, bind:
> (global-set-key (kbd "<mouse-2>")
> (lambda (click)
> (interactive "e")))
>
> Then, click with mouse-2 in a *Help* buffer.

Sorry; I don't understand this bug report.  Why do you need to bind
<mouse-2>?  <mouse-2> is already bound in *Help* buffers, and gives you
that error (if you're not clicking on a button).

Do you just wish to rebind <mouse-2> in all buffers?  Then you should
probably rebind <down-mouse-2> instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 30 Jul 2021 18:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Fri, 30 Jul 2021 18:23:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Morelli <morelli <at> flux.utah.edu>
Cc: 49784 <at> debbugs.gnu.org
Subject: Re: bug#49784: 27.2; mouse-2 error with "No cross-reference here"
Date: Fri, 30 Jul 2021 21:22:07 +0300
> From: Robert Morelli <morelli <at> flux.utah.edu>
> Date: Fri, 30 Jul 2021 11:20:52 -0600
> 
> This might be related to bug 11174 reported 9 years ago.
> 
> To reproduce, bind:
> (global-set-key (kbd "<mouse-2>")
> (lambda (click)
> (interactive "e")))
> 
> Then, click with mouse-2 in a *Help* buffer.

Why is this a bug?  *Help* buffers have mouse-2 bound locally to a
command, and local bindings take precedence over global ones.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Fri, 30 Jul 2021 18:55:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49784 <at> debbugs.gnu.org, Robert Morelli <morelli <at> flux.utah.edu>
Subject: Re: bug#49784: 27.2; mouse-2 error with "No cross-reference here"
Date: Fri, 30 Jul 2021 20:54:08 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Why is this a bug?  *Help* buffers have mouse-2 bound locally to a
> command, and local bindings take precedence over global ones.

I don't quite understand the reported issue either, but it's pretty odd
for help-mode to bind mouse-2 -- we generally don't do that in buffers;
only buttons have mouse bindings.

Especially with this not very helpful command:

;; The doc string is meant to explain what buttons do.
(defun help-follow-mouse ()
  "Follow the cross-reference that you click on."
  (interactive)
  (error "No cross-reference here"))

I guess the point is to...  not say

Buffer is read-only: #<buffer *Help*>

to be helpful?  It might just confuse more than it helps.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Fri, 30 Jul 2021 19:07:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 49784 <at> debbugs.gnu.org, morelli <at> flux.utah.edu
Subject: Re: bug#49784: 27.2; mouse-2 error with "No cross-reference here"
Date: Fri, 30 Jul 2021 22:06:00 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Robert Morelli <morelli <at> flux.utah.edu>,  49784 <at> debbugs.gnu.org
> Date: Fri, 30 Jul 2021 20:54:08 +0200
> 
> Especially with this not very helpful command:
> 
> ;; The doc string is meant to explain what buttons do.
> (defun help-follow-mouse ()
>   "Follow the cross-reference that you click on."
>   (interactive)
>   (error "No cross-reference here"))
> 
> I guess the point is to...  not say
> 
> Buffer is read-only: #<buffer *Help*>
> 
> to be helpful?  It might just confuse more than it helps.

Perhaps the comment before the function hints on why this was done
that way.  IOW, if this binding didn't exist, what would C-h show for
mouse-2, and how?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Fri, 30 Jul 2021 19:50:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49784 <at> debbugs.gnu.org, morelli <at> flux.utah.edu
Subject: Re: bug#49784: 27.2; mouse-2 error with "No cross-reference here"
Date: Fri, 30 Jul 2021 21:49:03 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> ;; The doc string is meant to explain what buttons do.
>> (defun help-follow-mouse ()
>>   "Follow the cross-reference that you click on."
>>   (interactive)
>>   (error "No cross-reference here"))
>> 
>> I guess the point is to...  not say
>> 
>> Buffer is read-only: #<buffer *Help*>
>> 
>> to be helpful?  It might just confuse more than it helps.
>
> Perhaps the comment before the function hints on why this was done
> that way.  IOW, if this binding didn't exist, what would C-h show for
> mouse-2, and how?

It'd say

It is bound to <mouse-2>.

(mouse-yank-primary CLICK)

like in any other buffer it's not bound.  I understand that the binding
was done to be helpful, but I'm just not sure that it's helpful to make
*Help* buffers behave weirdly.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49784; Package emacs. (Sat, 31 Jul 2021 11:30:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49784 <at> debbugs.gnu.org, morelli <at> flux.utah.edu
Subject: Re: bug#49784: 27.2; mouse-2 error with "No cross-reference here"
Date: Sat, 31 Jul 2021 13:29:13 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> like in any other buffer it's not bound.  I understand that the binding
> was done to be helpful, but I'm just not sure that it's helpful to make
> *Help* buffers behave weirdly.

After pondering this some more, I don't think the having `C-h <mouse-2>'
in *Help* buffers giving a vaguely helpful (but ultimately confusing)
message warrants binding useless commands (that get in the way of
legitimate use cases, like globally rebinding <mouse-2>) makes that much
sense.

So I've now removed the bindings and made the commands obsolete.  We'll
see whether there's any negative reactions to this, I guess...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 49784 <at> debbugs.gnu.org and Robert Morelli <morelli <at> flux.utah.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 31 Jul 2021 11:30:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 Aug 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 241 days ago.

Previous Next


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