-
Notifications
You must be signed in to change notification settings - Fork 407
Errors using omnicomplete midway through compilation #2457
Description
Description
Sometimes when latexmk is halfway through compilation, using omnicompletion throws up various errors.
I'm hardly an expert about the LaTeX compilation process but I imagine the aux file is being written over, so these errors aren't supposed to be "fixed" per se. But probably silencing the errors is beneficial? I notice plenty of the surrounding code is surrounded by try/catch/endtry already.
Investigating the tracebacks, the offending lines which I can find are:
| let l:labels += l:current.labels |
usually raises E734: Wrong variable type for +=
vimtex/autoload/vimtex/parser/auxiliary.vim
Line 115 in 791cf0e
| let l:name = get(remove(l:tree, 0), 0, '') |
usually raises E896: Argument of get() must be a List, Dictionary or Blob or E684: list index out of range: 0
vimtex/autoload/vimtex/parser/auxiliary.vim
Line 119 in 791cf0e
| let l:context = remove(l:tree, 0) |
usually raises E684: list index out of range: 0
Steps to reproduce
- Open a tex file which takes reasonably long time to compile (like my thesis I'm working on 😢 )
- Start compilation
- Type
\cref{and mash<C-x><C-o>; I imagine it's the same for any other command e.g.\ref{} - Record tracebacks
Expected behavior
Graciously failing with "Pattern not found".
Actual behavior
Errors as described above.
Do you use a latexmkrc file?
Yes
VimtexInfo
System info:
OS: macOS 12.4 (21F79)
Vim version: NVIM v0.7.2
Has clientserver: true
Servername: /var/folders/17/5jmhtwzx1zs4l2krr8v78rv40000gp/T/nvimVsY4fl/0
VimTeX project: thesis
base: thesis.tex
root: /Users/yongrenjie/dphil/thesis
tex: /Users/yongrenjie/dphil/thesis/thesis.tex
main parser: current file verified
document class: book
packages: amsbsy amsgen amsmath amsopn amstext appendix array atbegshi-ltx atveryend-ltx auxhook biblatex bigintcalc bitset blx-case-expl3 booktabs braket calc caption caption3 catchfile chemformula cleveref color ctablestack environ epigraph epstopdf-base etexcmds etoolbox expl3 fancyhdr fancyvrb fix-cm floatrow fontenc fontspec fontspec-luatex footmisc framed fvextra geometry gettitlestring graphics graphicx hycolor hyperref ifluatex ifplatform iftex ifthen ifvtex ifxetex infwarerr intcalc keyval kvdefinekeys kvoptions kvsetkeys l3keys2e letltxmacro lineno logreq ltxcmds lualatex-math luatexbase makecell makecmds mathtools metalogo mhsetup microtype minted nameref nextpage nicefrac parskip pdfescape pdftexcmds perpage pgf pgfcomp-version-0-65 pgfcomp-version-1-18 pgfcore pgffor pgfkeys pgfmath pgfrcs pgfsys polyglossia refcount rerunfilecheck rotating setspace shellesc showkeys siunitx stringenc subcaption tcolorbox textcomp tikz titlesec tocbibind translations trig trimspaces unicode-math unicode-math-luatex uniquecounter upquote url usebib verbatim xcolor xfrac xkeyval xparse xstring xtemplate xurl
source files:
thesis.tex
preamble/fonts.tex
preamble/packages.tex
preamble/macros.tex
frontmatter/titlepage.tex
frontmatter/abstract.tex
frontmatter/preface.tex
frontmatter/acknowledgements.tex
theory/main.tex
theory/quantum_mechanics.tex
theory/rotating_frame.tex
theory/density_operators.tex
theory/pulse_sequences.tex
theory/pulseacq.tex
theory/inept.tex
theory/2dnmr.tex
theory/hsqc_states.tex
theory/hsqc_ea.tex
pureshift/main.tex
pureshift/intro_theory.tex
pureshift/intro_practice.tex
pureshift/acquisition_modes.tex
pureshift/elements.tex
pureshift/psyche_analysis.tex
pureshift/nsaltire.tex
pureshift/optimisation.tex
pureshift/timerev.tex
pureshift/dpsyche.tex
pureshift/epsidosy.tex
poise/main.tex
poise/introduction.tex
poise/implementation.tex
poise/applications.tex
poise/pulsecal.tex
poise/ernst.tex
poise/noesy.tex
poise/hsqc.tex
poise/hmbc.tex
poise/invrec.tex
poise/epsi.tex
poise/psyche.tex
poise/solvsupp.tex
poise/diffusion.tex
poise/esrpoise.tex
noah/main.tex
noah/introduction.tex
noah/snr.tex
noah/genesis.tex
noah/modules.tex
noah/sehsqc.tex
noah/hsqctocsy.tex
noah/hsqccosy.tex
noah/jres_psyche.tex
noah/dqfcosy.tex
noah/hmqc.tex
noah/hmbc.tex
noah/adequate.tex
noah/solvsupp.tex
noah/shortd1.tex
noah/parallel.tex
appendix/other/main.tex
appendix/other/penguins.tex
appendix/other/abbotsbury.tex
appendix/other/website.tex
compiler: latexmk
engine: -lualatex
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 1
executable: latexmk
job:
jobid: 6
output: /var/folders/17/5jmhtwzx1zs4l2krr8v78rv40000gp/T/nvimVsY4fl/1
cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -lualatex -pvc -view=none -e '$compiling_cmd = ($compiling_cmd ? $compiling_cmd . " ; " : "") . "echo vimtex_compiler_callback_compiling"' -e '$success_cmd = ($success_cmd ? $success_cmd . " ; " : "") . "echo vimtex_compiler_callback_success"' -e '$failure_cmd = ($failure_cmd ? $failure_cmd . " ; " : "") . "echo vimtex_compiler_callback_failure"' 'thesis.tex'
pid: 41458
viewer: Skim
qf method: LaTeX logfile