[Top][All Lists]

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

bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer wi

From: Juri Linkov
Subject: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason
Date: Wed, 07 Mar 2018 23:11:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>>> Please clarify what do you have in mind.  In what place in code such
>>>> function could be called?
>>> Any place that contains
>>>    (setq next-error-last-buffer buffer)
>>>    (setq-default next-error-last-buffer buffer)
>>> now, would instead call
>>>    (funcall next-error-save-last-buffer-function target-buf target-win)
>> But isn't it possible to do this in next-error-hook?
>> It's called by run-hooks in the same place in next-error.
> For one thing, next-error-select-buffer doesn't call next-error-hook.
> And there are other such places (e.g. like you were saying
> xref--xref-buffer-mode should set next-error-last-buffer similarly).

3. And hooks are intended only for user customization.

> Aside from that, why would we want to obscure this piece of logic behind
> a hook?

Instead of a hook I think it would be fine to define an “advisable” function
like Stefan asked to do for next-error-find-buffer-function to be able
to put advices on it.

reply via email to

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