Re: external editor under windows7
Otfried Cheong <[email protected]>
| Newsgroups | gmane.comp.graphics.ipe.general |
|---|---|
| Organization | Ipe HQ |
| Message-ID | <[email protected]> |
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).
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).
Cheers,
Otfried