Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VimwikiGenerateLinks can't work!!! #886

Closed
VimWei opened this issue May 22, 2020 · 12 comments
Closed

VimwikiGenerateLinks can't work!!! #886

VimWei opened this issue May 22, 2020 · 12 comments
Assignees
Labels

Comments

@VimWei
Copy link

VimWei commented May 22, 2020

detailed description of the problem

  1. run gvim 8.2, open vimwiki, open page [Wiki Links](Generated_Links)
  2. run :VimwikiGenerateLinks
  3. get the errors:
处理 function Redir#redir[11]..vimwiki#base#generate_links[45]..vimwiki#base#update_listing_in_buffer[79]..7[11]..vimwiki#base#is_diary_file 时发生错误:
第    4 行:
E65: 无效的回引
处理 function Redir#redir[11]..vimwiki#base#generate_links[45]..vimwiki#base#update_listing_in_buffer 时发生错误:
第   79 行:
E714: 需要 List

.vimrc about vimwiki

    Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
    let wiki = {}
    let wiki.name = 'ChenWei VimwikiMd'
    let wiki.path = 'd:/WeirdData/VimwikiMd/'
    let wiki.ext = '.md'
    let wiki.syntax = 'markdown'
    let wiki.nested_syntaxes = {'python': 'python'}
    let wiki.links_space_char = '_'
    let wiki.list_margin = 0
    let wiki.auto_toc = 1
    let wiki.auto_tags = 1
    let wiki.auto_generate_tags = 1

    let g:vimwiki_list = [wiki]
    let g:vimwiki_ext2syntax = {'.md': 'markdown'}
    let g:vimwiki_global_ext = 1
    let g:vimwiki_autowriteall = 1
    let g:vimwiki_auto_chdir = 1
    let g:vimwiki_folding = 'expr'

:VimwikiShowVersion

Os: Windows
Vim: 802
Branch: dev

Revision: f54b94a

Date: 2020-05-20 14:43:56 -0400

:version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 29 2019 23:21:03)
MS-Windows 64-bit GUI version 带 OLE 支持
包含补丁: 1-57
编译者 appveyor@APPVYR-WIN
巨型版本 带图形界面。  可使用(+)与不可使用(-)的功能:
+acl                +comments           +file_in_path       +listcmds           +persistent_undo    +statusline         +vartabs
+arabic             +conceal            +find_in_path       +localmap           +popupwin           -sun_workshop       +vertsplit
+autocmd            +cryptv             +float              +lua/dyn            -postscript         +syntax             +virtualedit
+autochdir          +cscope             +folding            +menu               +printer            +tag_binary         +visual
+autoservername     +cursorbind         -footer             +mksession          +profile            -tag_old_static     +visualextra
+balloon_eval       +cursorshape        +gettext/dyn        +modify_fname       +python/dyn         -tag_any_white      +viminfo
-balloon_eval_term  +dialog_con_gui     -hangul_input       +mouse              +python3/dyn        +tcl/dyn            +vreplace
+browse             +diff               +iconv/dyn          +mouseshape         +quickfix           -termguicolors      -vtp
++builtin_terms     +digraphs           +insert_expand      +multi_byte_ime/dyn +reltime            +terminal           +wildignore
+byte_offset        +directx            +job                +multi_lang         +rightleft          -termresponse       +wildmenu
+channel            -dnd                +jumplist           +mzscheme/dyn       +ruby/dyn           +textobjects        +windows
+cindent            -ebcdic             +keymap             +netbeans_intg      +scrollbind         +textprop           +writebackup
+clientserver       +emacs_tags         +lambda             +num64              +signs              -tgetent            -xfontset
+clipboard          +eval               +langmap            +ole                +smartindent        +timers             -xim
+cmdline_compl      +ex_extra           +libcall            +packages           +sound              +title              +xpm_w32
+cmdline_hist       +extra_search       +linebreak          +path_extra         +spell              +toolbar            -xterm_save
+cmdline_info       -farsi              +lispindent         +perl/dyn           +startuptime        +user_commands      
     系统 vimrc 文件: "$VIM\vimrc"
     用户 vimrc 文件: "$HOME\_vimrc"
 第二用户 vimrc 文件: "$HOME\vimfiles\vimrc"
 第三用户 vimrc 文件: "$VIM\_vimrc"
      用户 exrc 文件: "$HOME\_exrc"
  第二用户 exrc 文件: "$VIM\_exrc"
    系统 gvimrc 文件: "$VIM\gvimrc"
    用户 gvimrc 文件: "$HOME\_gvimrc"
第二用户 gvimrc 文件: "$HOME\vimfiles\gvimrc"
第三用户 gvimrc 文件: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
        系统菜单文件: "$VIMRUNTIME\menu.vim"
编译方式: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL   -DFEAT_XPM_W32   -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python37.dll\" -DFEAT_MZSCHEME -I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl528.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=24 -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
链接方式: link  /nologo /opt:ref /LTCG:STATUS /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib  /machine:AMD64  libcmt.lib oleaut32.lib user32.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python37.lib   "C:\Tcl\lib\tclstub86.lib" winmm.lib WSock32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug
@VimWei VimWei changed the title VimwikiGenerateLinks Error VimwikiGenerateLinks Error E65 and E714 May 22, 2020
@VimWei VimWei changed the title VimwikiGenerateLinks Error E65 and E714 VimwikiGenerateLinks can't word!!! Jun 15, 2020
@VimWei
Copy link
Author

VimWei commented Jun 15, 2020

I have updated vimwiki, the errors still here.

:VimwikiShowVersion

Os: Windows
Vim: 802
Branch: dev
Revision: a9f21c6
Date: 2020-06-08 14:31:35 +0200

@tinmarino
Copy link
Member

tinmarino commented Jun 16, 2020

Please :

  • :echom vimwiki#base#is_diary_file(@%)
  • :debug call vimwiki#base#is_diary_file(@%)

In the debugging section, try to copy ans paste here the content of l:diary_file_paths; l:normalised_file_paths and l:matching_files . Once you get all that, the (our) error may appear obvious. As many things are chinese on your computer, I suspect this is some regular expression that is not supporting some Chinese chars. Are all your path ASCII ?

@VimWei
Copy link
Author

VimWei commented Jun 17, 2020

#881

@tinmarino
Copy link
Member

tinmarino commented Aug 6, 2020

@ChenWeird did b1de908 solved the issue ?

@tinmarino tinmarino added the bug label Aug 6, 2020
@tinmarino tinmarino added this to Needs triage in Bug Triage Deprecated via automation Aug 6, 2020
@tinmarino tinmarino moved this from Needs triage to High priority in Bug Triage Deprecated Aug 6, 2020
Bug Triage Deprecated automation moved this from High priority to Closed Aug 6, 2020
@VimWei VimWei changed the title VimwikiGenerateLinks can't word!!! VimwikiGenerateLinks can't work!!! Aug 7, 2020
@VimWei
Copy link
Author

VimWei commented Aug 7, 2020

I've updated vimwiki to:

Os: Windows
Vim: 802
Branch: dev

Revision: 0693e41

Date: 2020-08-06 17:04:58 -0400

But still can't generate links:

:VimwikiGenerateLinks

Error detected while processing function Redir#redir[11]..vimwiki#base#generate_links[48]..vimwiki#base#update_listing_in_buffer[84]..4[11]..vimwiki#base#is_diary_file:
line    4:
E15: Invalid expression: s_Anki_学习计划.md'
Error detected while processing function Redir#redir[11]..vimwiki#base#generate_links[48]..vimwiki#base#update_listing_in_buffer:
line   84:
E714: List required

And I notice that there's "Simon's_Anki_学习计划.md" but not the message "s_Anki_学习计划.md".

@tinmarino
Copy link
Member

My bad, I thought it was fixed

@tinmarino tinmarino reopened this Aug 7, 2020
Bug Triage Deprecated automation moved this from Closed to Needs triage Aug 7, 2020
@tinmarino tinmarino self-assigned this Aug 7, 2020
@tinmarino
Copy link
Member

tinmarino commented Aug 7, 2020

And I notice that there's "Simon's_Anki_学习计划.md" but not the message "s_Anki_学习计划.md".

Ahhhhhh ! The ' ! Easy to solve now, of course, this line ...

let l:matching_files =
\ filter(l:normalised_file_paths, "v:val ==# '" . a:filename . "'" )
... should escape the '

@tinmarino
Copy link
Member

tinmarino commented Aug 7, 2020

Finally reproducing it ! Sorry for being so annoying (not helpful) on this issue: I had to:

  1. Get a file name Simon's_Anki_学习计划.md in the root
  2. Get at least one diary file (otherwise, there is not work done)

Not related to Windows

--> Debuging echo: Tin ['/home/tourneboeuf/Test/Wiki/diary/2020-08-07.md']
Error detected while processing function vimwiki#base#generate_links[48]..vimwiki#base#update_listing_in_buffer[84]..10[11]..vimwiki#base#is_diary_file:
line    5:
E15: Invalid expression: s_Anki_学习计划.md'
Error detected while processing function vimwiki#base#generate_links[48]..vimwiki#base#update_listing_in_buffer:
line   84:
E714: List required
Press ENTER or type command to continue

@tinmarino tinmarino moved this from Needs triage to High priority in Bug Triage Deprecated Aug 7, 2020
@tinmarino
Copy link
Member

tinmarino commented Aug 7, 2020

Fixed: 4aa3ca5

Escaping the single quote wich is the only one that must be escaped: from :h expr-'

This string is taken as it is.  No backslashes are removed or have a special
meaning.  The only exception is that two quotes stand for one quote.

I let you close it if it is really solved (as I wrongly closed it 3 times ... [sorry for that by the way])

Bug Triage Deprecated automation moved this from High priority to Closed Aug 13, 2020
@VimWei
Copy link
Author

VimWei commented Aug 13, 2020

Now :VimwikiGenerateLinks are not output blank, but there are something wrong:

2020-08-13_222310

@tinmarino
Copy link
Member

This last issue is much more complex to solved: See #478 : we should first make tests work on windows, this will take time (months, years). Sorry

@chinwobble
Copy link
Contributor

+1 I'm having the same issue where :VimwikiGenerateLinks doesn't work on Windows. It generates full paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants