unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Donovan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: Eli Zaretskii <eliz@gnu.org>,
	71435@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>,
	Juri Linkov <juri@linkov.net>
Subject: bug#71435: interactive xref-find-definitions-at-mouse
Date: Mon, 10 Jun 2024 10:39:04 -0400	[thread overview]
Message-ID: <CAPVWWDUb1ffMswVDsvUQCwQSPW5KYN0VwCHUmdDTHaAPBhe=GQ@mail.gmail.com> (raw)
In-Reply-To: <87frtl1djg.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 1523 bytes --]

> ?? This works for me:
>  (global-set-key [C-down-mouse-1] 'xref-find-definitions-at-mouse)

Ah, I remember the problem now: if the point is at position A and the mouse
click occurs at some unrelated position B, plain old
xref-find-definitions-at-mouse will use position A as the basis of the
query, which is most surprising: it might be a non-identifier, in
which case you get an error, or it might be an unrelated identifier, in
which case you navigate to the wrong place.

So perhaps my request should instead have been expressed as a bug report:
xref-find-definitions-at-mouse uses the point instead of the mouse event
position.





On Mon, 10 Jun 2024 at 03:07, Philip Kaludercic <philipk@posteo.net> wrote:

> Juri Linkov <juri@linkov.net> writes:
>
> >>>>> Many editors allow a mouse-click operation on an identifier, plus a
> suitable modifier key, to jump to the
> >>>>> declaration of the symbol. Emacs provides
> xref-find-definitions-at-mouse, but I couldn't find a way to make it
> >>>>> work in response to a click.
> >>>>
> >>>> ??? This works for me:
> >>>>
> >>>>   (global-set-key [C-down-mouse-1] 'xref-find-definitions-at-mouse)
> >>>
> >>> Should we consider adding such a key binding by default?
> >>>
> >>> Is that a feature that users want?
> >>
> >> Perhaps one could add a global minor mode and mention it in the menu
> bar?
> >
> > I'd rather enable context-menu-mode by default.
>
> If that is up to the discussion, I'd vote for that as well!
>
> --
>         Philip Kaludercic on peregrine
>

[-- Attachment #2: Type: text/html, Size: 2746 bytes --]

  reply	other threads:[~2024-06-10 14:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-08 15:28 bug#71435: interactive xref-find-definitions-at-mouse Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-08 16:31 ` Eli Zaretskii
2024-06-09 18:29   ` Stefan Kangas
2024-06-09 18:58     ` Eli Zaretskii
2024-06-10  6:11     ` Philip Kaludercic
2024-06-10  6:32       ` Juri Linkov
2024-06-10  7:07         ` Philip Kaludercic
2024-06-10 14:39           ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-10 14:44             ` Stefan Kangas
2024-06-10 15:23             ` Eli Zaretskii
2024-06-10 17:26               ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-10 17:43                 ` Philip Kaludercic
2024-06-10 18:47                   ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-10 18:59                     ` Stefan Kangas
2024-06-10 17:55                 ` Eli Zaretskii
2024-06-09 16:46 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPVWWDUb1ffMswVDsvUQCwQSPW5KYN0VwCHUmdDTHaAPBhe=GQ@mail.gmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71435@debbugs.gnu.org \
    --cc=adonovan@google.com \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=philipk@posteo.net \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).