Skip to content

Pass diagnostic description as list to fit Flymake columns#33

Open
jleechpe wants to merge 1 commit into
erickgnavar:masterfrom
jleechpe:master
Open

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

Conversation

@jleechpe

@jleechpe jleechpe commented Jul 9, 2025

Copy link
Copy Markdown

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

jleechpe commented Jul 9, 2025

Copy link
Copy Markdown
Author

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

@erickgnavar

Copy link
Copy Markdown
Owner

Hi, now we have a emacs-31 branch maybe we can adapt this to support both configs, emacs < 31 and emacs 31, what do you think?

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