GNU bug report logs -
#33870
27.0.50; xref-goto-xref not configurable
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 25 Dec 2018 20:53:01 UTC
Severity: minor
Found in version 27.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Juri,
Juri Linkov <juri <at> linkov.net> writes:
> 1. simplifies ‘xref--show-pos-in-buf’
... and considerably complexifies xref--show-xref-buffer (more on that
later)
> while at the same time preserves the current behavior and respects
> user's customization of display actions;
That's great!
> 2. makes the xref buffer non-obtrusive like *Completions*
> in xref--show-xref-buffer;
After a brief look, I'm not sure I like the UI change. "not sure" is
not an euphemism for "don't like", I'm ust not sold on the idea yet:
* Certainly you don't mean non-obtrusive, you mean "less obtrusive" and
really it's "slightly less obtrusive". It does use potentially less
space and doesn't temporarily use one of your windows if you happen to
have several. I agree this is an good advantage.
* But by using less space it is also less useful. You don't get to see,
at a glance, a great deal of xrefs. And xrefs are different from
completions, they're closer to grep hits. You wouldn't put *grep*
hits in such a potentially tiny window, would you?
Then again, perhaps you would, and the whole point of this patch is to
make the UI configurable. If so, I'd make the original UI the default,
or at least very very easy to bring back.
> 3. turns the existing arg QUIT of xref-goto-xref into a prefix arg,
> so a natural key sequence ‘C-u RET’ will quit the window.
> This is similar to the prefix arg of quit-window.
No problem here I think.
> - (display-buffer buf action))
> + `(,(lambda (buf alist)
> + (window--display-buffer buf xref--original-window 'reuse alist)))))))
>
Using internal "--" symbols from window.el is a temporary solution I
hope.
> - (pop-to-buffer (current-buffer))
> + (pop-to-buffer
> + (current-buffer)
> + `((display-buffer--maybe-same-window
> + display-buffer-reuse-window
> + display-buffer--maybe-pop-up-frame
> + display-buffer-below-selected)
> + ,(if temp-buffer-resize-mode
> + '(window-height . resize-temp-buffer-window)
> + '(window-height . fit-window-to-buffer))
> + ,(when temp-buffer-resize-mode
> + '(preserve-size . (nil . t)))))
Again, too many --, and seems like a lot of repetition from window.el.
Perhaps you want window.el to export a function that encapsulates
all/some of this cruft to pass as ACTION. Naming that function would be
the hardest problem (best I could do is
display-buffer-use-completions-like-window).
Or maybe put that function in xref.el. But as I said above, I think we
also need a function that brings back the current default.
João
This bug report was last modified 6 years and 35 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.