-
Notifications
You must be signed in to change notification settings - Fork 391
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
Tectonic compiler method doesn't parse errors properly #2703
Comments
Ah, interesting. With Notice, though, as a workaround, you could use another quickfix backend. E.g. add |
Thanks for the link and for trying to explain, I'm still a bit confused though. First of all,
But nothing happens when I compile it and the quickfix is empty, just as before. Did I understand correctly that the problem is that |
If you add it to your vimrc file and install A simple thing to try:
The set nocompatible
set runtimepath^=~/.local/plugged/vimtex
set runtimepath+=~/.local/plugged/vimtex/after
filetype plugin indent on
syntax enable
let g:vimtex_compiler_method = 'tectonic'
let g:vimtex_quickfix_method = 'pplatex' Notice, though, that you need to use the correct path to VimTeX on the first lines.
Yes, correct.
Because
|
👍👍.
I tried something similar: I created a I have |
In the screencast, it looks like |
Oh, it is due to asciinema's number of rows to display setting - I changed it back to the default and not it doesn't look empty. |
It would be simpler and less work to just try what I explained. There is no reason to set
As mention, it looks like the Could you also show the output of |
It was kind of hard to paste the
|
Oh sorry that was
|
Some files appear in |
I tried to use |
Good, things look more or less right, I can't immediately see why this fails. On my end, the same setup works. So, let's dig deeper:
|
Are you on the latest VimTeX version? |
The next level of debugging here will be to ask you to do some print debugging. Specifically, it would be interesting to see the output of adding vimtex/autoload/vimtex/compiler.vim Line 46 in 18255a2
You will probably need to do The next location to inspect is here: vimtex/autoload/vimtex/compiler/_template.vim Line 458 in 18255a2
specifically, I'm curious about the output of |
pplatex doesn't have officially stable releases yet, and apparently NixOS distributes a version from 2015! I updated it to the latest commit of After adding both
Where this is my diff --git i/autoload/vimtex/compiler.vim w/autoload/vimtex/compiler.vim
index 3bd21b62..77707fae 100644
--- i/autoload/vimtex/compiler.vim
+++ w/autoload/vimtex/compiler.vim
@@ -43,6 +43,7 @@ function! vimtex#compiler#callback(status) abort " {{{1
" 1: Compilation cycle has started
" 2: Compilation complete - Success
" 3: Compilation complete - Failed
+ unsilent echom "debug" a:status
if !exists('b:vimtex.compiler') | return | endif
silent! call s:output.pause()
diff --git i/autoload/vimtex/compiler/_template.vim w/autoload/vimtex/compiler/_template.vim
index b8ad8ccf..c8079efa 100644
--- i/autoload/vimtex/compiler/_template.vim
+++ w/autoload/vimtex/compiler/_template.vim
@@ -455,6 +455,7 @@ function! s:callback_nvim_exit(id, data, event) abort dict " {{{1
if b:vimtex.compiler.status == 0 | return | endif
let l:target = self.tex !=# b:vimtex.tex ? self.tex : ''
+ unsilent echom "inquire" vimtex#qf#inquire(l:target)
call vimtex#compiler#callback(2 + vimtex#qf#inquire(l:target))
endfunction
I can run `pplatex from within Neovim:
Pressing
|
I'm using the latest Vimtex version as of today. |
Do I understand correctly that your example/test directory now looks essentially like this?
Here set nocompatible
set runtimepath^=~/.local/plugged/vimtex
set runtimepath+=~/.local/plugged/vimtex/after
filetype plugin indent on
syntax enable
let g:vimtex_compiler_method = 'tectonic'
let g:vimtex_quickfix_method = 'pplatex'
\documentclass{minimal}
\begin{document}
Hello World!
$
\end{document} AND
If you can confirm, then we know we are looking at a similar minimal example!
This shows that, for some reason, the |
It's a similar setup. Only I named the TeX file |
I have even managed to see that diff --git i/autoload/vimtex/compiler.vim w/autoload/vimtex/compiler.vim
index 3bd21b62..77707fae 100644
--- i/autoload/vimtex/compiler.vim
+++ w/autoload/vimtex/compiler.vim
@@ -43,6 +43,7 @@ function! vimtex#compiler#callback(status) abort " {{{1
" 1: Compilation cycle has started
" 2: Compilation complete - Success
" 3: Compilation complete - Failed
+ unsilent echom "debug" a:status
if !exists('b:vimtex.compiler') | return | endif
silent! call s:output.pause()
diff --git i/autoload/vimtex/compiler/_template.vim w/autoload/vimtex/compiler/_template.vim
index b8ad8ccf..418ff7e8 100644
--- i/autoload/vimtex/compiler/_template.vim
+++ w/autoload/vimtex/compiler/_template.vim
@@ -455,6 +455,8 @@ function! s:callback_nvim_exit(id, data, event) abort dict " {{{1
if b:vimtex.compiler.status == 0 | return | endif
let l:target = self.tex !=# b:vimtex.tex ? self.tex : ''
+ unsilent echom "inquire" vimtex#qf#inquire(l:target)
+ unsilent echom "inquire target" l:target
call vimtex#compiler#callback(2 + vimtex#qf#inquire(l:target))
endfunction
diff --git i/autoload/vimtex/qf.vim w/autoload/vimtex/qf.vim
index b15cccdd..51efaf10 100644
--- i/autoload/vimtex/qf.vim
+++ w/autoload/vimtex/qf.vim
@@ -113,6 +113,7 @@ function! vimtex#qf#setqflist(...) abort " {{{1
let l:blg = b:vimtex.compiler.get_file('blg')
let l:jump = g:vimtex_quickfix_autojump
endif
+ unsilent echom "setqflist log file is" l:log
try
" Initialize the quickfix list
@@ -159,6 +160,7 @@ endfunction
" }}}1
function! vimtex#qf#inquire(file) abort " {{{1
+ unsilent echom "inquire target is" a:file
try
call vimtex#qf#setqflist(a:file)
return s:qf_has_errors()
diff --git i/autoload/vimtex/qf/pplatex.vim w/autoload/vimtex/qf/pplatex.vim
index 42b2e473..aeddf845 100644
--- i/autoload/vimtex/qf/pplatex.vim
+++ w/autoload/vimtex/qf/pplatex.vim
@@ -85,12 +85,13 @@ function! s:qf.addqflist(tex, log) abort dict " {{{1
endif
let l:tmp = fnamemodify(a:log, ':r') . '.pplatex'
+ unsilent echom "pplatex log file is" l:tmp
call vimtex#jobs#run(printf('pplatex -i "%s" >"%s"', a:log, l:tmp))
call vimtex#paths#pushd(b:vimtex.root)
call vimtex#qf#u#caddfile(self, l:tmp)
call vimtex#paths#popd()
- call delete(l:tmp)
+ "call delete(l:tmp)
endfunction
" }}}1 |
Could it be an issue with the
I still see no errors... I think this is as far as I will go myself. I once in my life tried to create a simple |
I think there is no |
What's the content of the |
Same as I showed in one of my previous comments:
|
Ah, now I see: on my end, the output of
Notice how there is "in test.tex" on my end, while it is lacking on your end. The |
I don't know why the pplatex output on your end does not contain the filenames (with "in FILE.tex"). But I pushed an update that partially fixes this for you. The errors are now not "complete", as they lack the filename, but you should get an indication that there is an error and on which line it is. |
What version of |
BTW this is my
|
This is installed on Arch Linux with the AUR package that installs from the Git repo. Thus, it is the latest version, I think.
Yes. But it is because we are using different minimal LaTeX files. I've now manually written what you showed in your earlier screencast (this content is really something you should provide as text, because it is much easier to work with). Now I can reproduce the issue locally as well.
Version 0.12.0 |
I believe this must be a strange bug with |
I don't have much experience with C++, but it seems |
Finally 😅 Thanks a lot for you help! I will open an issue at pplatex. |
Hehe, yeah, sometimes it takes a lot just to get on the same page. :)
Glad to help! Feel free to link the issues and let me know if there are any useful updates! |
Description
Using Tectonic 0.12.0, I noticed that an error appearing on CLI like this:
Doesn't always appear on Vimtex' quickfix - I experience this with some files, an example file appears below.
Steps to reproduce
Open Vimtex'
test/test-doc/test.tex
and add a single$
that will produce an error:Try to compile the error after you
let g:vimtex_compiler_method = 'tectonic'
.Expected behavior
Vimtex opens the quickfix and showing the error:
Actual behavior
Vimtex doesn't open up the quickfix, and it is empty. Where if you run manually
tectonic test.tex
you see:Do you use a latexmkrc file?
No, tectonic.
VimtexInfo
The text was updated successfully, but these errors were encountered: