Guenter Milde wrote:

* In my view, instead of coding one more crippled drawing editor (which I
  would have to learn to use), a better integration with external editors
  is the way to go. This also allows users the choice between several
editors and file formats.
I agree. There are enough drawing editors of various kinds.
But of course it would be nice to easily
"create+insert a new external object"
and have it created from scratch. LyX could even suggest a
default filename, so only those that care about the filename
need to type one.


* A vector image should be saved in a vector format (e.g. an inkscape
  drawing as *.svg. LyX can work with inkscape's native format.)

* There is the [edit in external editor] menu item available with
  right-click on the image (already pointed out).
  However, currently this will fail with a non-existing file.
Idea: enable image generation via the "external edit" feature:

1. The user inserts a graphic with a new file name.
2. LyX shows the box with file name and "file not found!"

3. With right-click and "external edit", LyX should call the associated
editor with the new file name instead of reporting a missing file.¹

Instead of the "file not found!" thing, why not make the first dialog
with two buttons: "Open", to be used for existing files, and
"Create new" to do just that. No error to be corrected by the user this way.


¹ Unfortunately, inkscape is "ill behaved" in this respect: Most editors (e.g. LyX) open a new buffer and associate it with the given file name if called with a non-existing file. `inkscape nonexisting.svg` will report an error. This can be worked
  around with a wrapper script:
if "filename" does not exit:
      copy a template file to "filename"
     call inkscape "filename"

This can be handled by extending the "external inset" mechanism a little. Add a way to specify whether to software can make a new
named file, or if it need an "empty template". LyX could then ship
with external templates for apps that need such care.

Helge Hafting

Reply via email to