bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#40919: 27.0.91; next-error-select-buffer does not always behave as d


From: Juri Linkov
Subject: bug#40919: 27.0.91; next-error-select-buffer does not always behave as documented
Date: Fri, 12 Jun 2020 01:43:29 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> what kind of functions do they want to put on there?

Both next-error-buffer-on-selected-frame and 
next-error-no-navigation-try-current.

> And/or would they be content to advice-add on
> next-error-find-buffer-function instead?

Is it possible to add advice-add by using customization?

>> -(defcustom next-error-find-buffer-function #'ignore
>> +(defcustom next-error-find-buffer-function '(ignore)
>
>                                              ^s, maybe?

Ok, when using as a hook it could be '-functions', but in case
of using advice-add it should be still '-function'.

>> +   (or (and (functionp next-error-find-buffer-function)
>> +            (funcall next-error-find-buffer-function avoid-current
>> +                     extra-test-inclusive extra-test-exclusive))
>> +       (and (listp next-error-find-buffer-function)
>> +            (run-hook-with-args-until-success
>> +             'next-error-find-buffer-function avoid-current
>> +             extra-test-inclusive extra-test-exclusive)))
>
> Looks like run_hook_with_args can deal with the case where the value of the
> hook is a single function.

Ok, if it's impossible to use advice-add then lets simplify the hook case.

>>      ;; 2. If next-error-last-buffer is an acceptable buffer, use that.
>>      (if (and next-error-last-buffer
>>               (next-error-buffer-p next-error-last-buffer avoid-current
>
> Should we take the rest of the cases in next-error-find-buffer and move
> them to the default value of the above hook?

I don't think so, I don't believe someone might want to customize the
rest of the cases.





reply via email to

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