[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33870: 27.0.50; xref-goto-xref not configurable

From: João Távora
Subject: bug#33870: 27.0.50; xref-goto-xref not configurable
Date: Thu, 03 Jan 2019 14:24:15 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (windows-nt)

Hi Juri,

Juri Linkov <address@hidden> writes:

> 1. simplifies ‘xref--show-pos-in-buf’

... and considerably complexifies xref--show-xref-buffer (more on that

> 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

> -        (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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]