[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: Juri Linkov
Subject: bug#33870: 27.0.50; xref-goto-xref not configurable
Date: Tue, 29 Jan 2019 23:10:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>> You probably mean separate 'direction' and 'window' entries instead of
>>> the (direction . (WIN . DIR)).  But we didn't find a good term for
>>> denoting the reference window and the two inherently belong together.
>> I think your idea of combining them is good.
> So using (direction . (DIR . WIN)) would be OK?

And what to do when the future will require adding a third arg?
This is why better to avoid dotted pairs, and use a list like

  (direction DIR WIN)

>> Currently it requires too much boilerplate code to do such simple things
>> as displaying the buffer below/bottom with resizing to fit its height.
>> Please grep “-at-bottom” and “-below-selected” for the current cases,
>> they are all ugly: some of them use ‘with-displayed-buffer-window’ with
>>    '((window-height . fit-window-to-buffer)
>>      (preserve-size . (nil . t)))
>> some are more uglier
>>    ,(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)))
>> some use the macro ‘with-current-buffer-window’, some use
>> ‘pop-to-buffer’ with ‘display-buffer-below-selected’ action.
>> Do you think it's possible to generalize all these cases
>> to use simpler display actions/alists?
> I'm afraid that this one
>>    ,(if temp-buffer-resize-mode
>>         '(window-height . resize-temp-buffer-window)
> is not entirely kosher.  'resize-temp-buffer-window' should be called
> only from 'temp-buffer-show-hook' or 'temp-buffer-window-show-hook'.
> 'display-buffer-at-bottom' can't tell whether BUFFER is temporary or
> not.  Or am I missing something?

I don't know.  At least, it seems it's doing its job.  What doesn't work
is for example (pop-to-buffer buf '(display-buffer--maybe-at-bottom))
in files.el.  Please try to use a file with Local Variables that ask
for permissions interactively, using a single-window wide frame:
instead of showing the Local Variables buffer at the bottom
it splits windows horizontally and shows the Local Variables at the top
of the right-hand window.  If the windows were already split horizontally,
then it correctly displays the Local Variables at the bottom.

reply via email to

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