[Ipe-discuss] external editor under windows7

Otfried Cheong otfried at ipe.airpost.net
Sun Oct 26 03:45:04 CET 2014

On 26/10/14 01:03, Jerzy Wrobel wrote:
> I modified the prefs.lua with:
>     prefs.external_editor = "notepad++ D:\\%s"
> After pressing Editor button, the message box
>      D:\s764 doesn't exist. Create it?
> showed up and then notepad started with new,
> empty document window. However, after editing,
> saving text end exiting the editor, nothing happened
> ("Create text object" window in Ipe was still empty).


     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()


   local fname = "D:\\ipetemp.txt"

or whatever you like (obviously the file must be writeable by Ipe and by 
the editor).


More information about the Ipe-discuss mailing list