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 #49 received at 33992-done <at> debbugs.gnu.org (full text, mbox):
>> A patch is proposed in a separate bug#35737.
I'm closing this request because now xref is customizable enough.
And we have no more opinions for changing the default behavior.
FWIW, this is what I currently use to customize xref-find-definitions
to act more like Completions:
(custom-set-variables
'(display-buffer-alist
'((display-buffer-to-xref-p display-buffer-in-direction
(direction . below)
(window-height . fit-window-to-buffer)))))
(defun display-buffer-to-xref-p (buffer-name _action)
(and (string-match-p "\\`\\*\\(xref\\)\\*\\(\\|<[0-9]+>\\)\\'"
buffer-name)
(memq this-command '(xref-find-definitions))))
(with-eval-after-load 'xref
(defvar xref--original-command nil)
(advice-add 'xref-find-definitions :after
(lambda (&rest _args)
(with-current-buffer (window-buffer)
(setq-local xref--original-command 'xref-find-definitions))))
(define-key xref--button-map [(control ?m)]
(lambda ()
(interactive)
(if (memq xref--original-command '(xref-find-definitions))
(call-interactively 'xref-quit-and-goto-xref)
(setq xref--original-window nil)
(call-interactively 'xref-goto-xref)))))
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.