Skip to content

:save does not change the compiler directory #2734

@user202729

Description

@user202729

Description

See title.

Additional information: looks like echo b:vimtex.compiler.state.root is not properly updated. There's the function! s:filename_changed_post() abort " {{{1 function that is called when the filename changes.

Using \lx manually works.

Steps to reproduce

  1. Have any TeX file.
  2. Start and stop the compiler.
  3. :save another-directory/a.tex.
  4. Start the compiler again. It will fail this time.

VimtexInfo

System info:
  OS: Arch Linux
  Vim version: VIM 9.0 (1-1337)
  Has clientserver: true
  Servername: vim2

VimTeX project: b
  base: b.tex
  root: /tmp
  tex: /tmp/b.tex
  main parser: current file verified
  document class: article
  packages: amsbsy amsfonts amsgen amsmath amsopn amstext amsthm csquotes currfile etoolbox expl3 filehook filehook-2020 iftex keyval kvoptions kvsetkeys l3keys2e ltxcmds precattl pythonimmediate saveenv typstmathinput unicode-math-input xcolor
  compiler: latexmk
    engine: -pdf
    options:
      -file-line-error
      -latexoption=-shell-escape
      -latexoption=-recorder
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: process 73440 dead
      output: /tmp/vxDgVoe/2
      cmd: max_print_line=2000 latexmk -file-line-error -latexoption=-shell-escape -latexoption=-recorder -synctex=1 -interaction=nonstopmode -pdf -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"' 'a.tex'
      pid: 73440
  viewer: Zathura
    xwin id: 71303171
    cmd_start: zathura  -x "/usr/bin/vim -T dumb --not-a-term -n -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 463:1:'/tmp/a.tex' 'a.pdf'&
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions