xuhdev / vim-latex-live-preview

A Vim Plugin for Lively Previewing LaTeX PDF Output
https://www.topbug.net/blog/2013/06/13/live-preview-of-latex-in-vim/
GNU General Public License v3.0
832 stars 73 forks source link

PDF output only updates on save #36

Closed ranguli closed 6 years ago

ranguli commented 7 years ago

Expected behavior

PDF updates after typing

Actual behavior

PDF only updates after :w

Steps to reproduce

Tell us how it occurs

  1. :LLPStartPreview on a LaTeX document
  2. Try to edit document
  3. Save in order to see changes

System configuration

#VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 25 2017 13:17:56)
Included patches: 1-771
Compiled by ranguli@swoosh
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
+balloon_eval    +folding         +mouse_xterm     +termguicolors
+browse          -footer          +multi_byte      -terminal
++builtin_terms  +fork()          +multi_lang      +terminfo
+byte_offset     +gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
+clientserver    +insert_expand   +packages        +title
+clipboard       +job             +path_extra      +toolbar
+cmdline_compl   +jumplist        +perl            +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
+cscope          +lispindent      +python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      +startuptime     +xpm
+eval            +mouse_dec       +statusline      +xsmp_interact
+ex_extra        -mouse_gpm       -sun_workshop    +xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
+farsi           +mouse_netterm   +tag_binary      
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircore -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -ldl  -L/usr/lib -llua5.1 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.5/config -lpython3.5m  -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm  
badouralix commented 7 years ago

Funny bug, specially because of this line which is supposed to ensure the same behavior whether one stops writing or saves file.

Just to be sure: could it be a previewer issue ? That is the pdf is actually recompiled and up-to-date in the temp dir, but not shown

Or could it be related to your python3-patch ? About that, can you provide a gist of this patch that I can try ? ( you don't need to bother with versioning and pull requesting for now )

ranguli commented 7 years ago

AFAIK, Zathura was listed as a supported PDF reader, but I'll try it with another one. Which reader are you using?

Here's a gist (no quality control, just straight copypaste) with the patch and I expanded the statement that checks for python into two separate ones in order to tell which one fails if a dependency is missing.

badouralix commented 7 years ago

Personally, I'm using evince.

Good point: your patch is working fine with my configuration +python3/dyn 👍

Problem: I can't reproduce your bug with zathura and zathura-pdf-mupdf. Which pdf backend are you using? Otherwise, could your provide an actual tex project which fails? (files, filenames and pathnames)

ranguli commented 7 years ago

Looks like evince also doesn't refresh for me until I save the document. What's the best way of telling what the PDF backend is? (Maybe we should add a debugging command that prints out things like PDF viewer, PDF backend, etc. Any tex document will fail, whether it's in the same root directory as where I ran vim or otherwise.

badouralix commented 7 years ago

I would say it depends on how you installed zathura.

Oh, I ran into this bug within a special case, and this is why there is this known issue. I never found out why... But we should dig then!

Yeah, we should definitely add a debugging command! And ask for the output when an issue is opened. Something like :echo llp_debug or LLPDebug or LLPShowDebug or LLPOutputDebug etc.

stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!