[Ipe-discuss] external editor under windows7
Jerzy Wrobel
wrobel at ifpan.edu.pl
Sun Oct 26 15:06:28 CET 2014
>
> This:
>
> prefs.external_editor = "notepad++ D:\\%s
>
> cannot work. Ipe needs to write the temporary file before calling the
> editor, so if it writes to file bla and you then call the editor on
> d:\bla, that cannot possibly work. The correct setting should simply be:
>
> prefs.external_editor = "notepad++ %s
>
> The temporary filename is simply created by the Lua function
> os.tmpname(). Does this simply return a short name with path like
> "s764" on Windows? That's annoying.
>
> For the moment, you could easily fix that: At the beginning of
> tools.lua, in the function externalEditor, change:
>
> local fname = os.tmpname()
>
> to
>
> local fname = "D:\\ipetemp.txt"
>
> or whatever you like (obviously the file must be writeable by Ipe and by
> the editor).
Now, it works, thank you very much.
>> The temporary filename is simply created by the Lua function
>> os.tmpname(). Does this simply return a short name with path like
>> "s764" on Windows? That's annoying.
>
> On checking, this is the intended behaviour of tmpname(). The temporary
> file is meant to be created in the current directory.
>
> Is this a problem under Windows? If you set
>
> prefs.external_editor = "notepad++ %s"
>
> doesn't it work correctly?
It does not. "Cannot create the file C:\s8es"
message pops up.
Regards,
Jerzy
More information about the Ipe-discuss
mailing list