Re: external editor under windows7

"Jerzy Wrobel" <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.