On 12/10/2009 08:11 AM, G. Milde wrote:
addToRC() doesn't do any string interpolation. It just writes what you give it. I think Uwe is confusing this with the various checkViewer...() routines, which do. That is why I was suggesting we should check for a viewer. That, and the fact that you have to do so on Linux, since the autoOpen stuff does not work there.Unsurprisingly, this code writes this:...\Format wmf wmf "Windows Metafile" "" "%s" "%s" "vector"...to lyxrc.defaults,This means that either the "%s" is indeed wrong or Uwe's addition misses a string interpolation like ''') % (iv, ie)
It's better, in the sense that you don't get an error. But you also don't have a viewer. So if we JUST write "auto", then it's as if we've done nothing, as far as Linux is concerned. What we ought to do is something like: path, v = checkViewerEditor('an rtf, odt, and doc viewer and editor', ['oowriter', 'abiword', 'evil.exe'],If I manually replace "%s" with "auto", then absolutely nothing happens, for the simple reason that support::os::autoOpenFile() does nothing but return false on Linux.Is this the same behaviour as before or does it replace a mores sensible action on Linux?
rcentry = [r'''
\Format rtf rtf "" "%%" "%%" ""
\Format odt odt "" "%%" "%%" ""
\Format doc doc "" "%%" "%%" ""
'''])
I thought about using "xdg-mime query default application/rtf", e.g., but this simply hangs on my system. (There are similar reports on Ubuntu.) Is there some library to which we could link to get such info?Perhaps someone should fix that.This would be fine, but it seems we are still far away as IMO this implies a solution like xdg-open which was ruled out (at least for now) # for xdg-open issues look here: http://www.mail-archive.com/[email protected]/msg151818.html
So far as I know, whether I am running under KDE or Gnome or XFCE or whatever has nothing to do with this. LyX is just trying to run a command.I was not speaking about executing a file but opening it with a system default. This is why I asked for the action in Konqueror. Now I learned that "auto" will ot use any system default under Linux (not konqueror, nor nautilus or xdg-open).
Yes, that is the issue. rh
