GNU bug report logs -
#77809
adding next-error support for flymake diagnostics buffers
Previous Next
Reported by: matthewktromp <at> gmail.com
Date: Mon, 14 Apr 2025 21:08:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
matthewktromp <at> gmail.com writes:
> Spencer Baugh <sbaugh <at> janestreet.com> writes:
>>>> (funcall visit bbeg bend)))))
>>>> + (setq next-error-buffer diagnostics-buffer
>>>> + next-error-last-buffer diagnostics-buffer)
>>
>> Setting next-error-last-buffer makes sense and matches other buffers
>> which set next-error-function (e.g. xref-goto-xref), but do we need to
>> set next-error-buffer? It seems like setting that is managed by
>> next-error itself.
>
> I think you're right. That should be removed.
OK, make sure to include that in the next version of the patch, if one
is needed.
>>>> (define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
>>>> "Flymake diagnostics"
>>>> "A mode for listing Flymake diagnostics."
>>>> @@ -2015,6 +2040,9 @@ flymake-diagnostics-buffer-mode
>>>> (setq tabulated-list-format flymake--diagnostics-base-tabulated-list-format)
>>>> (setq tabulated-list-entries
>>>> 'flymake--diagnostics-buffer-entries)
>>>> +
>>>> + (setq-local next-error-function #'flymake--diagnostics-next-error)
>>>> +
>>
>> This should be set in the major mode initialization (the body of the
>> define-derived-mode).
>
> It is set in the body of the define-derived-mode.
>
>>>> @@ -2085,6 +2114,9 @@ flymake-project-diagnostics-mode
>>>> (setq tabulated-list-format
>>>> (vconcat [("File" 25 t)]
>>>> flymake--diagnostics-base-tabulated-list-format))
>>>> +
>>>> + (setq-local next-error-function #'flymake--diagnostics-next-error)
>>>> +
>>
>> Likewise, this should be set in the major mode initialization (the body
>> of the define-derived-mode).
Oh, my mistake, sorry.
This looks good to me then, seems to work fine. Let's wait a few more
days for comments and then I think this can be installed.
This bug report was last modified 15 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.