GNU bug report logs - #50067
Context menus

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 15 Aug 2021 08:52:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Mattias EngdegÄrd <mattiase <at> acm.org>,
 Juri Linkov <juri <at> linkov.net>
Cc: tkk <at> misasa.okayama-u.ac.jp, Tak Kunihiro <homeros.misasa <at> gmail.com>,
 50067 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Alan Third <alan <at> idiocy.org>
Subject: Re: bug#50067: Context menus
Date: Sat, 21 Aug 2021 02:31:53 +0300
Hi Mattias!

On 20.08.2021 20:06, Mattias EngdegÄrd wrote:
> * If I start emacs -Q and enable context-menu-mode, right-clicking on an identifier in an elisp buffer still doesn't produce the Find Definition entry, presumably because xref hasn't been loaded. Shouldn't it be arranged to be autoloaded somehow, which is how xref works when invoked by keystrokes?

I wonder what could be the reason for that. It would seem the menu 
should handle autoloaded commands fine. Even the visibility predicate 
should work: xref-find-backend is autoloaded as well.

Try rewriting it with a let, to ensure that xref-find-backend is called 
first:

(let ((backend (xref-find-backend)))
  (xref-backend-identifier-at-point backend))

> * `xref-make-match` requires (contrary to its doc string) its LOCATION argument to be of type `xref-file-location`, but some backends may only be able to make an `xref-buffer-location`. Would anyone object to changing the :location slot of `xref-match-item` to have type `xref-location`? I don't see how it could hurt.

Makes sense to me, seems like an accident. I've done this change 
locally, no obvious bugs fell out.




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

Previous Next


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