Skip to content

Vimtex: Viewer cannot find Zathura window ID #1719

@paulrougieux

Description

@paulrougieux

I used minimal.vim with the 'zathura' viewer:

set nocompatible
let &runtimepath  = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
" Use zathura as a PDF viewer
let g:vimtex_view_method = 'zathura'

and minimal.tex

\documentclass{minimal}
\begin{document}
Hello world!
\end{document}

I started vim with

    vim -u minimal.vim minimal.tex

Commands/Input
I called :vimtexView while editing minimal.tex.

Observed Behaviour
When launching :VimtexView I can see the following error message:

vimtex: Viewer cannot find Zathura window ID!

And the focus stays on vim. If I close the Zathura window, and call the :vimtexView again, it is displayed correctly the first time althogh the error message is still displayed. Then if I just call the command another time, the focus doesn't jump to the zathura window and the error message is displayed again.

Expected Behaviour
I expect the command :VimtexView to jump the focus to the Zathura viewer.

Output from VimtexInfo

System info
  OS: Debian GNU/Linux 10 (buster)
  Vim version: VIM 8.1 (1-875, 878, 884, 948, 1046, 1365-1368, 1382, 1401)
  Has clientserver: false

vimtex project: minimal
  base: minimal.tex
  root: /tmp/vimtexissue
  tex: /tmp/vimtexissue/minimal.tex
  out: /tmp/vimtexissue/minimal.pdf
  log: /tmp/vimtexissue/minimal.log
  aux: /tmp/vimtexissue/minimal.aux
  fls: /tmp/vimtexissue/minimal.fls
  main parser: current file verified
  compiler: latexmk
    backend: jobs
    output: /tmp/vULXQPT/2
    configuration:
      continuous: 1
      callback: 1
      latexmk options:
        -verbose
        -file-line-error
        -synctex=1
        -interaction=nonstopmode
      latexmk engine: -pdf
  viewer: Zathura
    xwin id: 0
    process:
      pid: -
      cmd: zathura -x "/usr/bin/vim.nox --servername  --remote-expr \"vimtex#view#reverse_goto(%{line}, '%{input}')\
  qf: LaTeX logfile
    config:
      packages:
        default: 1
      default: 1
  document class: minimal
~

In addition Zathura version:

 zathura --version
zathura 0.4.3
girara 0.3.2 (runtime: 0.3.2)
(plugin) pdf-poppler (0.2.9) (/usr/lib/x86_64-linux-gnu/zathura/libpdf-poppler.so)

This issue is related but different to #1117.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions