lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.3k stars 387 forks source link

Zathura issues with finding Window ID #2904

Closed KaXMaXimum closed 3 months ago

KaXMaXimum commented 3 months ago

Description

I've been having issues using zathura as my pdf viewer for vimtex.

At first I kept getting the error "Viewer cannot find Zathura window ID". However, when I run xdotool search --class Zathura I always get two outputs: (the numbers obviously change everytime i open a new window)

25165825 25165827

If I close zathura, then they both disappear.

Running \ll or \lv before opening Zathura gives me an error that the window ID wasn't found, and in :VimtexInfo the xwin id is 0. Opening a zathura window manually gets the first of the two IDs instead, but the commands don't do anything. If I for example run the forward search command manually, a separate zathura window opens with the correct highlight. Backwards searching does however work.

This happens regardless of the tex file used. Does it have something to do with the fact that zathura gets two window IDs?

This error randomly started happening today, everything worked yesterday.

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: EndeavourOS Linux
  Vim version: NVIM v0.9.5
  Has clientserver: true
  Servername: /run/user/1000/nvim.2031.0

VimTeX project: Test
  base: Test.tex
  root: /mount/Users/user/Documents/
  tex: /mount/Users/user/Documents/Test.tex
  main parser: current file verified
  document class: article
  packages: amsbsy amsfonts amsgen amsmath amsopn amssymb amstext atbegshi atbegshi-ltx atveryend atveryend-ltx auxhook babel bigintcalc bitset enumitem epstopdf-base etexcmds etoolbox fontenc fullpage gettitlestring graphics graphicx hycolor hyperref iftex infwarerr intcalc keyval kvdefinekeys kvoptions kvsetkeys letltxmacro listings lstmisc ltxcmds microtype multicol nameref pdfescape pdftexcmds pgf pgfcomp-version-0-65 pgfcomp-version-1-18 pgfcore pgffor pgfkeys pgfmath pgfrcs pgfsys refcount rerunfilecheck tikz tikz-cd trig uniquecounter url xcolor
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: 7
      output: /tmp/nvim.user/BHQmd8/0
      cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode  -pdf -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"' 'Leistungsbericht.tex'
      pid: 2213
  viewer: Zathura
    xwin id: 25165827
    cmd_forward_search: zathura --synctex-forward 44:78:'/mount/Users/user/Documents/Test.tex' '../../mount/Users/user/Documents/Test.pdf'&
    cmd_start: zathura  -x "/usr/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 55:38:'/mount/Users/user/Documents/Test.tex' '../../mount/Users/user/Documents/Test.pdf'&
  qf method: LaTeX logfile

EDIT: Additional Info: zathura_simple doesn't work either, nothing happens when compiling or viewing. I am also on X11.

Using zathura_simple and running the command from VimtexInfo manually opens a zathura window with a line highlighted. Inverse search works, but forward search doesn't.

KaXMaXimum commented 3 months ago

Interestingly enough, it seems to have been a problem with gvfs. Not sure how or why, but uninstalling it fixed everything.

I wouldn't recommend uninstalling gvfs without thinking about it, but my setup is currently very weird and I won't run into problems by doing that.

lervag commented 3 months ago

Glad to hear you figured it out. I'm not sure if I would ever think about gvfs...