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

Running :InstantRst gives the error that it can't open a .tmp file #20

Open
maaroen opened this issue Feb 15, 2018 · 11 comments
Open

Running :InstantRst gives the error that it can't open a .tmp file #20

maaroen opened this issue Feb 15, 2018 · 11 comments

Comments

@maaroen
Copy link

maaroen commented Feb 15, 2018

When I run the :InstantRst command from a RST file I get the following error messages:
image

Sorry for it being in dutch, but it means:

  • Error occured while processing function startdaemon
  • Opening file Appdata\Local\xxxxx.tmp has failed
  • Error occured while processing function refreshview
  • Opening file xxxxx.tmp has failed

Could you help me to make this work?

@gu-fan
Copy link
Owner

gu-fan commented Feb 17, 2018

I need to make a tmp file in your tmp directory, can you open that directory?

@maaroen
Copy link
Author

maaroen commented Feb 18, 2018

Yea the directory is available but It still gives the same error message.

@maaroen
Copy link
Author

maaroen commented Feb 19, 2018

It looks like it tries to open the tempfile with the wrong name. Because I see a tempfile being created, but in the error messages it says it looks for a different file.

For example:
This file gets created: VI0001.tmp
And the error says the following:
Could not open file VI201250.tmp

@gu-fan
Copy link
Owner

gu-fan commented Feb 19, 2018

...

@maaroen
Copy link
Author

maaroen commented Feb 19, 2018

Do you have any idea why this is happening? I would like to use this plugin because it looks awesome if it works.

@gu-fan
Copy link
Owner

gu-fan commented Feb 20, 2018

let b:ir_tmpfile = tempname()

you can check with :echo tempname() if it return a right filename

@maaroen
Copy link
Author

maaroen commented Feb 20, 2018

Yea it does:
image

I've even put echos in the instantRst.vim file to see what the filename is that it wants to process, and it is the same filename as that is made on disk, but when it executes the command. It still gives a different name.

@gu-fan
Copy link
Owner

gu-fan commented Feb 25, 2018

well...

@maaroen
Copy link
Author

maaroen commented Mar 1, 2018

Were you able to find a reason for this ?

@gu-fan
Copy link
Owner

gu-fan commented Mar 2, 2018

call writefile(buf, b:ir_tmpfile)

No, you can try yourself, check if it's the right name when writing file

add echo b:ir_tmpfile before that line

@unicell
Copy link

unicell commented Mar 12, 2020

Run into the same, and #22 fixes it.

Besides, since instant-rst is in Python3, had to use pip3 install https://github.com/Rykka/instant-rst.py/archive/master.zip as I have both pip (python2) and pip3 (python3) in my system.

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