Skip to content

:save doesn't change main file name properly #3042

@user202729

Description

@user202729

Description

As in the title. See steps to reproduce below

Steps to reproduce

  1. vim b.tex

  2. paste the following content

    \documentclass{article}
    \begin{document}
    hello world
    \end{document}
  3. :w

  4. :save c.tex

  5. Filename change detected etc. notification seen

  6. \ll to start compiler

  7. :VimtexInfo. See compiler:... field still show the old file name as target: (although VimTeX project: line shows file name correctly as c)

Expected behavior

It should start the compiler with c.tex as file name

Actual behavior

No response

Do you use a latexmkrc file?

Irrelevant

VimtexInfo

(using latest master branch)

System info:
  OS: Arch Linux
  Vim version: VIM 9.1 (1-707)
  Has clientserver: true
  Servername: vim1

VimTeX project: c
  base: c.tex
  root: /tmp
  tex: /tmp/c.tex
  main parser: fallback current file
  document class: 
  packages: fastrecompile
  compiler: latexmk
    root: /tmp
    target: b.tex
    jobname: b
    engine: -lualatex
    options:
      -file-line-error
      -latexoption=-shell-escape
      -latexoption=-recorder
      -synctex=1
      -interaction=nonstopmode
    out_dir: /tmp/.vimtex_build_dir/
    aux_dir: /tmp/.vimtex_build_dir/
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: process 2704147 run
      output: /tmp/vZcZETr/0
      cmd: max_print_line=2000 latexmk -file-line-error -latexoption=-shell-escape -latexoption=-recorder -synctex=1 -interaction=nonstopmode  -lualatex -outdir=/tmp/.vimtex_build_dir/ -emulate-aux-dir -auxdir=/tmp/.vimtex_build_dir/ -pvc -pvctimeout- -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"' 'b.tex'
      pid: 2704147
  viewer: Zathura
    xwin id: 62914563
    cmd_start: zathura  -x "/usr/bin/vim -T dumb --not-a-term -n -c \"VimtexInverseSearch %{line}:%{column} '%{input}'\"" --synctex-forward 1:1:'/tmp/c.tex' '.vimtex_build_dir/b.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