Herbert Voss wrote:

> Georg Baum wrote:
> 
>> Here comes the patch. I removed the useless "user" format in the process.
>> Now getFormatFromContents() either returns a format name or an empty
>> string if it cannot determine the format. I even found two cases where
>> the return value of getFormatFromContents() needed to be checked.
> 
> then no one, like me, can no more use his special graphic files,
> which have names like *.user

As I understand it, everything continues to work for .user files even
without this special return value. Their format is of course not known, but
it is neither if we know that they are in "user" format. Maybe I miss
something. Could you please explain how this feature is supposed to work? I
mean
- What should lyx do if a .user file needs to be displayed
- What should lyx do if a .user file needs to be converted (to .eps, .png or
  whatever) for export
- What should lyx do if a .user file needs to be edited?

The problem with the current approach is that we have two special format
names for unknown formats: "" and "user". IMO we should only have one.
Furthermore, it makes it impossible to add a format named "user" to the
preferences.
I think that we can easily correct possible problems (if there are some)
with the addition of a "user" format to the preferences, as Lars suggests.
I would prefer that over hardcoding "user" in the code.


Georg

Reply via email to