8000 runtime(groff)!: update groff compiler by e-kwsm · Pull Request #17182 · vim/vim · GitHub
[go: up one dir, main page]

Skip to content

runtime(groff)!: update groff compiler #17182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

e-kwsm
Copy link
Contributor
@e-kwsm e-kwsm commented Apr 21, 2025

Problem: groff compiler assumes a single argument, i.e. output device like html, but the requirement is not checked properly. Also, macro packages is hardcoded to mom.
Solution: Control output device and macro package by variable. Arguments for :make are now ignored.

#17181

Problem: groff compiler assumes a single argument, i.e. output device
         like html, but the requirement is not checked properly.  Also,
         macro packages is hardcoded to mom.
Solution: Control output device and macro package by variable.
          Arguments for :make are now ignored.

vim#17181

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
@Konfekt
Copy link
Contributor
Konfekt commented Apr 22, 2025

Currenty -mom -T$* -- %:S > %:r:S.$* lets make pdf or make html output to a PDF or HTML file (similar to the pandoc compiler). This is more convenient than changing get(b:, 'groff_output_dev', get(g:, 'groff_output_dev', 'utf8')). This entails passing other arguments than the single output format by b/g:groff_ variables, but that's a restriction of :make itself. A workaround could be an additional command :Make/Groff to parse - arguments.

@chrisbra
Copy link
Member

Is that an ACK @Konfekt ?

@Konfekt
Copy link
Contributor
Konfekt commented Apr 22, 2025

Not quite. I found, say, make pdf or make html in a MOM file as natural as flexible to create an output of that format. Now it outputs an utf8 file by default and no longer allows switching output format, other than by changing g/b:groff_output_dev. That's impractical

@chrisbra
Copy link
Member

alright, makes sense. So let's make this draft so long.

@chrisbra chrisbra marked this pull request as draft April 22, 2025 18:41
@e-kwsm
Copy link
Contributor Author
e-kwsm commented Apr 24, 2025

It would be helpful if something like E119: Not enough arguments and E118: Too many arguments are issued for :make and :make pdf html, respectively.

And I feel raw PDF data in quickfix is noisy..

Screenshot From 2025-04-24 10-47-22

@Konfekt
Copy link
Contributor
Konfekt commented Apr 24, 2025

And I feel raw PDF data in quickfix is noisy

That's true. But when I try :make pdf on a Mom file, output reads
grafik

Can errorformat's %+/-G help here?

@Konfekt
Copy link
Contributor
Konfekt commented Apr 24, 2025

E119: Not enough arguments and E118: Too many arguments

I think :make inherently comes to an end of its capabilities and in principle needs to be expanded in Vim itself, say for the moment in an official async :Make.

For this issue, I guess one would have to add a buffer-local :Groff or :Make (taken by many plug-ins, see above) command to handle these arguments gracefully? (Then maybe similarly for pandoc, to make it somewhat coherent).

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.

3 participants
0