* bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1'
@ 2019-04-22 12:49 Drew Adams
2019-07-09 14:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2019-04-22 12:49 UTC (permalink / raw)
To: 35376
Subject line really says it all.
In bug #35353 Dmitry talks about a "show location bug don't switch
windows" action. Dunno what this is, so I went to the manual to find
out. Presumably, from the #35353 thread it has something to do with
`mouse-1'. And in any case `mouse-1' is the default way to access
references using the mouse, no? I would expect this node to say
something about `mouse-1'.
In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-04-13 built on CIRROCUMULUS
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1'
2019-04-22 12:49 bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1' Drew Adams
@ 2019-07-09 14:13 ` Lars Ingebrigtsen
2019-07-30 14:08 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-09 14:13 UTC (permalink / raw)
To: Drew Adams; +Cc: 35376
Drew Adams <drew.adams@oracle.com> writes:
> In bug #35353 Dmitry talks about a "show location bug don't switch
> windows" action. Dunno what this is, so I went to the manual to find
> out. Presumably, from the #35353 thread it has something to do with
> `mouse-1'. And in any case `mouse-1' is the default way to access
> references using the mouse, no? I would expect this node to say
> something about `mouse-1'.
The mouse bindings are a bit confusing:
(defvar xref--button-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-1] #'xref-goto-xref)
(define-key map [mouse-2] #'xref--mouse-2)
map))
Why is the command called xref--mouse-2? That's a very non-descriptive
command name. And... don't these two really kinda do the same thing?
mouse-1 sets the point first and then goes to the xref, and mouse-2
... does the same, only in a different way?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1'
2019-07-09 14:13 ` Lars Ingebrigtsen
@ 2019-07-30 14:08 ` Dmitry Gutov
2019-07-31 18:47 ` Lars Ingebrigtsen
2021-08-31 2:50 ` Lars Ingebrigtsen
0 siblings, 2 replies; 6+ messages in thread
From: Dmitry Gutov @ 2019-07-30 14:08 UTC (permalink / raw)
To: Lars Ingebrigtsen, Drew Adams; +Cc: 35376
On 09.07.2019 17:13, Lars Ingebrigtsen wrote:
> The mouse bindings are a bit confusing:
>
> (defvar xref--button-map
> (let ((map (make-sparse-keymap)))
> (define-key map [mouse-1] #'xref-goto-xref)
> (define-key map [mouse-2] #'xref--mouse-2)
> map))
>
> Why is the command called xref--mouse-2? That's a very non-descriptive
> command name.
It's been that way from the beginning. You can rename it, I think, if
you have a better name in mind.
> And... don't these two really kinda do the same thing?
> mouse-1 sets the point first and then goes to the xref, and mouse-2
> ... does the same, only in a different way?
Does the idea of "not switching windows" make sense to you?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1'
2019-07-30 14:08 ` Dmitry Gutov
@ 2019-07-31 18:47 ` Lars Ingebrigtsen
2019-12-23 16:28 ` Dmitry Gutov
2021-08-31 2:50 ` Lars Ingebrigtsen
1 sibling, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-31 18:47 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 35376
Dmitry Gutov <dgutov@yandex.ru> writes:
>> And... don't these two really kinda do the same thing?
>> mouse-1 sets the point first and then goes to the xref, and mouse-2
>> ... does the same, only in a different way?
>
> Does the idea of "not switching windows" make sense to you?
Oh, the only difference between these two commands is that one of them
puts point in the buffer where the definition is, and the other one
doesn't?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1'
2019-07-31 18:47 ` Lars Ingebrigtsen
@ 2019-12-23 16:28 ` Dmitry Gutov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2019-12-23 16:28 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 35376
On 31.07.2019 21:47, Lars Ingebrigtsen wrote:
> Oh, the only difference between these two commands is that one of them
> puts point in the buffer where the definition is, and the other one
> doesn't?
Interactively, that's the only difference, yes.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1'
2019-07-30 14:08 ` Dmitry Gutov
2019-07-31 18:47 ` Lars Ingebrigtsen
@ 2021-08-31 2:50 ` Lars Ingebrigtsen
1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-31 2:50 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 35376
Dmitry Gutov <dgutov@yandex.ru> writes:
>> The mouse bindings are a bit confusing:
>> (defvar xref--button-map
>> (let ((map (make-sparse-keymap)))
>> (define-key map [mouse-1] #'xref-goto-xref)
>> (define-key map [mouse-2] #'xref--mouse-2)
>> map))
>> Why is the command called xref--mouse-2? That's a very
>> non-descriptive
>> command name.
>
> It's been that way from the beginning. You can rename it, I think, if
> you have a better name in mind.
Now renamed and updated the documentation to mention mouse-1 and
mouse-2.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-31 2:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-22 12:49 bug#35376: 26.2; (emacs) `Xref Commands' - no mention of `mouse-1' Drew Adams
2019-07-09 14:13 ` Lars Ingebrigtsen
2019-07-30 14:08 ` Dmitry Gutov
2019-07-31 18:47 ` Lars Ingebrigtsen
2019-12-23 16:28 ` Dmitry Gutov
2021-08-31 2:50 ` 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).