vscode-texinfo-discussions
[Top][All Lists]
Advanced

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

RE: Using Texinfo Extension on Windows


From: Soft Works
Subject: RE: Using Texinfo Extension on Windows
Date: Sun, 3 Oct 2021 22:19:58 +0000


> -----Original Message-----
> From: Vscode-texinfo-discussions <vscode-texinfo-discussions-
> bounces+softworkz=hotmail.com@nongnu.org> On Behalf Of CismonX
> Sent: Sunday, 3 October 2021 20:29
> To: vscode-texinfo-discussions@nongnu.org
> Subject: Re: Using Texinfo Extension on Windows
> 
> > I just update to 0.2.2, now my solution doesn't work anymore
> 
> I took a look at your script. The script is trying to convert native
> Windows paths to WSL paths.
> Windows accept both slash and backslash as directory separator, but
> the script can only recognize backslash.
> 
> The v0.2.2 update of the extension converts all backslashes in the
> path of input file to slashes, as the
> Windows build of GNU Texinfo seems buggy when passing paths with
> backslashes to it.
> 
> Maybe that's the reason why your script doesn't work anymore.

Yes, that was it.

But you forgot to convert the path for --init-file as well. It's a 
bit inconsistent now:

-o- --no-split --html --error-limit=100 
--init-file=c:\Users\admin\.vscode\extensions\cismonx.texinfo-0.2.2/ext/html-preview.pm
 -D "__vscode_texinfo_image_uri_base 
https://file%2B.vscode-resource.vscode-webview.net/v%3A/ffbuild/source/ffmpeg/doc/";
 -c "EXTRA_HEAD <script>window.addEventListener('message', event => {const 
message = event.data;switch (message.command) {case 'goto':window.location.hash 
= message.value;history.pushState('', '', 
window.location.pathname);break;}})</script>" 
v:/ffbuild/source/ffmpeg/doc/filters.texi


> > What I couldn't get to work is to have issues listed in the
> "Problems" window
> 
> That is a confirmed bug.
> 
> The extension generates diagnostic information by parsing the output
> of makeinfo,
> but it does not properly recognize Windows paths because of the
> backslashes.

I tried both, but it neither works with forward- nor with backslashes.

What works in both cases though, is clicking on the path in the output
window, like for example:

v:/ffbuild/source/ffmpeg/doc/filters.texi:25563: @node seen before @end itemize

> Also it doesn't work with GNU Texinfo 6.8, as makeinfo no longer
> outputs the fully qualified path,
> only the filename.

The current version that WSL-Ubuntu has is 6.7..

> This bug should be fixed in the upcoming v0.2.3 release.

Sounds great!

> ---
> 
> > Though there's one important bit that doesn't seem to work, not
> even
> > when running VS Code on Linux: it's the sync with the preview
> position.
> 
> This feature only works with the `@node` command.
> 
> By convention, when we write a `@chapter` or `@section`, we put a
> `@node` line before it.
> However, FFmpeg's documentation doesn't seem to follow that
> convention.

OK, understood. Probably it is asked too much to make this work for
@section without node...?

At least, the missing nodes do not cause errors when building docs
and also the tex tools didn't complain (when running with the 
texinfo.tex schema). 
The toc/outline doesn't seem to need @node definitions either. 
I wouldn't need to be codelens decorations. What would be fine as
well (or maybe even better) is when clicking at an item in the 
outline would navigate to the right position not only in the .texi
file but in the preview as well.

I don't know the VS Code extension API though (only VS), so I 
don’t know how hard it would be to do this.

Anyway, let me say thank you for this nice extension which is 
practically the only viable way for editing texinfo docs nicely!

Kind regards,
softworkz


reply via email to

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