unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
@ 2021-07-30 17:20 Robert Morelli
  2021-07-30 18:09 ` Lars Ingebrigtsen
  2021-07-30 18:22 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Robert Morelli @ 2021-07-30 17:20 UTC (permalink / raw)
  To: 49784



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))






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

* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
  2021-07-30 17:20 bug#49784: 27.2; mouse-2 error with "No cross-reference here" Robert Morelli
@ 2021-07-30 18:09 ` Lars Ingebrigtsen
  2021-07-30 18:22 ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-30 18:09 UTC (permalink / raw)
  To: Robert Morelli; +Cc: 49784

Robert Morelli <morelli@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





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

* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
  2021-07-30 17:20 bug#49784: 27.2; mouse-2 error with "No cross-reference here" Robert Morelli
  2021-07-30 18:09 ` Lars Ingebrigtsen
@ 2021-07-30 18:22 ` Eli Zaretskii
  2021-07-30 18:54   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-07-30 18:22 UTC (permalink / raw)
  To: Robert Morelli; +Cc: 49784

> From: Robert Morelli <morelli@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.





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

* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
  2021-07-30 18:22 ` Eli Zaretskii
@ 2021-07-30 18:54   ` Lars Ingebrigtsen
  2021-07-30 19:06     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-30 18:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 49784, Robert Morelli

Eli Zaretskii <eliz@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





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

* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
  2021-07-30 18:54   ` Lars Ingebrigtsen
@ 2021-07-30 19:06     ` Eli Zaretskii
  2021-07-30 19:49       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-07-30 19:06 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 49784, morelli

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Robert Morelli <morelli@flux.utah.edu>,  49784@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?






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

* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
  2021-07-30 19:06     ` Eli Zaretskii
@ 2021-07-30 19:49       ` Lars Ingebrigtsen
  2021-07-31 11:29         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-30 19:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 49784, morelli

Eli Zaretskii <eliz@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





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

* bug#49784: 27.2; mouse-2 error with "No cross-reference here"
  2021-07-30 19:49       ` Lars Ingebrigtsen
@ 2021-07-31 11:29         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-31 11:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 49784, morelli

Lars Ingebrigtsen <larsi@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





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

end of thread, other threads:[~2021-07-31 11:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 17:20 bug#49784: 27.2; mouse-2 error with "No cross-reference here" Robert Morelli
2021-07-30 18:09 ` Lars Ingebrigtsen
2021-07-30 18:22 ` Eli Zaretskii
2021-07-30 18:54   ` Lars Ingebrigtsen
2021-07-30 19:06     ` Eli Zaretskii
2021-07-30 19:49       ` Lars Ingebrigtsen
2021-07-31 11:29         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).