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

E97: Cannot create diffs #15

Closed
abourree opened this issue Mar 30, 2015 · 3 comments
Closed

E97: Cannot create diffs #15

abourree opened this issue Mar 30, 2015 · 3 comments

Comments

@abourree
Copy link

Hi

I clone your repository and try to compare the two following lines:
Toto
Tutu

I get the following error;
Error detected while processing function 20_Linediff..20_PerformDiff..linediff#differ#CreateDiffBuffer:
line 26:
E97: Cannot create diffs
Press ENTER or type command to continue

And then diff doesn't show diff

I notice that vimdiff raise same error now

Regards,

Arnaud

@AndrewRadev
Copy link
Owner

This doesn't seem like a problem with linediff, especially considering that, as you say, the same error happens with the standard vimdiff command.

Execute the command :help E97 to see some information about the error (or check it out online here). It seems like the diff command can't be called or there are problems with the shell interface.

There are some tips on how to debug the problems in that help section. Try them out and let me know.

@abourree
Copy link
Author

Hi,

You are right, issue is not from Linediff. I remove MyDiff from .vimrc file and now it works perfectly. Thanks for your help and your script.

Arnaud.

@llinfeng
Copy link

I encountered the same problem, and the problem is indeed created by the MyDiff function. Here goes what I have removed. These lines were added for vim-latex-suite.

set diffexpr=MyDiff()
function! MyDiff()
    let opt = '-a --binary '
    if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
    if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
    let arg1 = v:fname_in
    if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
    let arg2 = v:fname_new
    if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
    let arg3 = v:fname_out
    if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
    let eq = ''
    if $VIMRUNTIME =~ ' '
        if &sh =~ '\<cmd'
            let cmd = '""' . $VIMRUNTIME . '\diff"'
            let eq = '"'
        else
            let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
        endif
    else
        let cmd = $VIMRUNTIME . '\diff'
    endif
    silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

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

No branches or pull requests

3 participants