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

On load file, can interpret Windows path as escape sequence #30

Closed
Fireedud opened this issue Aug 3, 2015 · 5 comments
Closed

On load file, can interpret Windows path as escape sequence #30

Fireedud opened this issue Aug 3, 2015 · 5 comments

Comments

@Fireedud
Copy link

Fireedud commented Aug 3, 2015

If the path contains something that looks like an escape sequence, it will interpret it as an escape sequence.

For example, if the file is located in C:\Documents\Lisp\test, an error message will appear:
PARSE-NAMESTRING: syntax error in filename "C:\Documents\Lisp est\morse.fas"

This doesn't happen when all the directory names are not valid escape sequences.

@kovisoft
Copy link
Owner

Sorry for the late response, but I was on vacation.
Could you please clarify what you mean by "on load file"?
Do you mean you use (load filename) or maybe slimv's Compile-Load-file command or something else?

@Fireedud
Copy link
Author

It happens with slimv's Compile-Load-File (,L). (load filename) works.
Compile-File (,F) works.

More information about my system:

  • Windows 7
  • gVim 7.4
  • clisp-2.49

@kovisoft
Copy link
Owner

I was not able to reproduce the problem on my system, but I think I know what the problem is.
Could you please test if the below change in function SlimvCompileLoadFile() in slimv.vim solves the problem for you?
Please add the line marked with '>' (but of course without the '>') which replaces all backslash characters with forward slashes in the compiled file name:

        if s:compiled_file != ''
>            let s:compiled_file = substitute( s:compiled_file, '\\', '/', 'g' )
            call SlimvCommandUsePackage( 'python swank_load_file("' . s:compiled_file . '")' )
            let s:compiled_file = ''
        endif
    endif
endfunction

@kovisoft
Copy link
Owner

kovisoft commented Sep 5, 2015

Fixed in commit 52d8bc2

@Fireedud
Copy link
Author

Fireedud commented Sep 5, 2015

Sorry, I missed your previous comment.

It works now.

@Fireedud Fireedud closed this as completed Sep 5, 2015
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

2 participants