GNU bug report logs -
#33992
27.0.50; xref-find-definitions wastes too much space
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sat, 5 Jan 2019 23:51:01 UTC
Severity: wishlist
Tags: patch
Found in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 33992 <at> debbugs.gnu.org (full text, mbox):
>>> Does it feel the same way to you?
>>
>> The difference is that completions pop up in a small unobtrusive window.
>
> Small window? I usually have a side-by-side fullscreen split, and if
> I initiate completion in one of the windows, *Completion* takes up the
> whole other window. Temporarily, of course.
The key word here is 'Temporarily'. Unlike *Completions*,
the *xref* buffer doesn't go out easily.
>> (defun display-buffer-condition-xref (buffer-name _action)
>> (and (string-match-p "\\`\\*\\(xref\\)\\*\\(\\|<[0-9]+>\\)\\'"
>> buffer-name)
>> (memq this-command '(xref-find-definitions))))
>>
>> (defun display-buffer-condition-from-xref (_buffer-name _action)
>> (string-match-p "\\`\\*\\(xref\\)\\*\\(\\|<[0-9]+>\\)\\'"
>> (buffer-name (current-buffer))))
>
> This function seems unused.
It's unused because it would be useful only in the *xref* buffer
created by the xref-find-definitions command, so xref needs to
provide a way to distinguish such case.
>> (setq display-buffer-alist
>> '((display-buffer-condition-xref
>> display-buffer-in-direction
>
> And this function is undefined in my Emacs.
This function is implemented by Martin in bug#33870.
>> (with-eval-after-load 'xref
>> (define-key xref--button-map [(control ?m)] #'xref-quit-and-goto-xref))
>>
>> How do you like that?
>
> I might, but since I can't really try your customization myself yet, I'll
> repeat a question you might be familiar with already:
>
> Will this also affect xref-find-references and project-find-regexp?
It should not affect them due to (memq this-command '(xref-find-definitions))
above. But also to not affect commands active in the *xref* buffer,
xref should provide a way to check if the *xref* buffer was created
by xref-find-definitions.
This bug report was last modified 5 years and 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.