Skip to content

Viewer cannot find Zathura window ID on macOS #1737

@flimofly

Description

@flimofly

Issue
In Neovim on MacOS, when pressing \lv to trigger :VimtexView, I get error message vimtex: Viewer cannot find Zathura window ID!. The Zathura window does not get a xwin id. xdotool is installed.

minimal.vim

set nocompatible
let &runtimepath  = '~/.vim/plugged/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/plugged/vimtex/after'
filetype plugin indent on
syntax on

let g:vimtex_view_method = 'zathura'

minimal.tex

\documentclass{article}
\begin{document}

\title{Big Title}
\author{Author Name}
\maketitle

\section{Chapter Title}
Consectetuer adipiscing elit. Aenean commodo ligula eget dolor.

\section{Chapter next}
Lorem ipsum dolor sit amet,

\end{document}

Output from VimtexCompileOuput

Rc files read:
  NONE
Latexmk: This is Latexmk, John Collins, 17 Apr. 2020, version: 4.69a.
Viewing pdf
======= Need to update make_preview_continuous for target files
Latexmk: I have not found a previewer that is already running. 
   So I will start it for 'mwe.pdf'
------------
Latexmk: All targets (mwe.pdf) are up-to-date
For rule 'view', running '&if_source(  )' ...
------------
Running 'start zathura  -x "nvr --servername /var/folders/bv/ctdkmjy5583dgsks5z4tf8r40000gn/T/vimr_E4615521-7C8A-4FBF-812D-F4D6EB8D1DBC.sock --remote +%{line} %{input}" "mwe.pdf"'
------------
------------
Running 'echo vimtex_compiler_callback_success'
------------
vimtex_compiler_callback_success

Commands/Input

  • Open source file
  • Compile with \ll
  • Put cursor within body of source file and do \lv or :VimtexView

Observed Behaviour
Error message appears

Expected Behaviour
Expect window to shift and passage to be highlighted in Zathura

Output from VimtexInfo

System info
  OS: Mac OS X 10.15.5 (19F101)
  Vim version: NVIM v0.4.3
  Has clientserver: true
  Servername: /var/folders/bv/ctdkmjy5583dgsks5z4tf8r40000gn/T/vimr_B34B0D20-0B2F-4D8E-B5B4-8BB5EBCAC57A.sock

vimtex project: mwe
  base: mwe.tex
  root: /Users/Timothy/Desktop/mwe
  tex: /Users/Timothy/Desktop/mwe/mwe.tex
  out: /Users/Timothy/Desktop/mwe/mwe.pdf
  log: /Users/Timothy/Desktop/mwe/mwe.log
  aux: /Users/Timothy/Desktop/mwe/mwe.aux
  fls: /Users/Timothy/Desktop/mwe/mwe.fls
  main parser: current file verified
  compiler: latexmk
    backend: nvim
    output: /var/folders/bv/ctdkmjy5583dgsks5z4tf8r40000gn/T/nvim3vxPQp/0
    configuration: 
      continuous: 1
      callback: 1
      latexmk options:
        -verbose
        -file-line-error
        -synctex=1
        -interaction=nonstopmode
      latexmk engine: -pdf
    pid: 1516
    cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -pvc -e '$new_viewer_always = "0"' -e '$pdf_previewer = "zathura  -x \"nvr --servername /var/folders/bv/ctdkmjy5583dgsks5z4tf8r40000gn/T/vimr_B34B0D20-0B2F-4D8E-B5B4-8BB5EBCAC57A.sock --remote +\%{line} \%{input}\" \%S"' -e '$success_cmd = "echo vimtex_compiler_callback_success"' -e '$failure_cmd = "echo vimtex_compiler_callback_failure"' 'mwe.tex'
  viewer: Zathura
    xwin id: 0
    process: 
      pid: -
      cmd: zathura -x "nvr --servername /var/folders/bv/ctdkmjy5583dgsks5z4tf8r40000gn/T/vimr_B34B0D20-0B2F-4D8E-B5B4-8BB5EBCAC57A.sock --remote-expr \"vimtex#view#reverse_goto(%{line}, '%{input}')\"" --synctex-forward 11:14:'/Users/Timothy/Desktop/mwe/mwe.tex'  '/Users/Timothy/Desktop/mwe/mwe.pdf' >/dev/null 2>&1 &
  qf: LaTeX logfile
    config: 
      packages: 
        default: 1
      default: 1
  document class: article

Edit by @lervag: Remove unnecessary options from minimal vimrc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions