Skip to content

Pass diagnostic description as list to fit Flymake columns#33

Open
jleechpe wants to merge 1 commit intoerickgnavar:masterfrom
jleechpe:master
Open

Pass diagnostic description as list to fit Flymake columns#33
jleechpe wants to merge 1 commit intoerickgnavar:masterfrom
jleechpe:master

Conversation

@jleechpe
Copy link
Copy Markdown

@jleechpe jleechpe commented Jul 9, 2025

Flymake supports the diagnostic info being passed as a list of '(origin code msg) which then maps to the columns.

INFO is a description of the problem detected. It may be a string, or
list (ORIGIN CODE MESSAGE) appropriately categorizing and describing the
diagnostic. ORIGIN may be a string or nil. CODE maybe be a string, a
number or nil. MESSAGE must be a string.

This changes it to use this functionality and end up consistent with Eglot LSP outputs

image

@erickgnavar
Copy link
Copy Markdown
Owner

I got this error when trying to show diagnostics. I'm using emacs 30

image

@jleechpe
Copy link
Copy Markdown
Author

jleechpe commented Jul 9, 2025

Ah, it requires flymake 1.4.1 (available via elpa or built-in on the emacs-31 branch). I guess this should either wait for that or add to package-requires.

I normally run off of emacs-git so didn't notice, switched to current version and got an error when using the updated code, update the package through elpa and it started working again.

@erickgnavar
Copy link
Copy Markdown
Owner

Ah, it requires flymake 1.4.1 (available via elpa or built-in on the emacs-31 branch). I guess this should either wait for that or add to package-requires.

I normally run off of emacs-git so didn't notice, switched to current version and got an error when using the updated code, update the package through elpa and it started working again.

I don't think that requiring a newest version of flymake is a good idea, it might have conflicts with other packages for who is not using emacs 31.

For now we can leave the PR open until the required version of flymake is included in emacs 30(I don't know how this works TBH) or wait until emacs 31 is the latest stable release

Another approach could be check somehow if the current installation of flymake has the feature required for this change, if so we can use this change otherwise just fallback to the existing code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants