On 03/23/2010 10:41 AM, Pavel Sanda wrote:
John McCabe-Dansted wrote:
I could paste the patch into the email, but I don't think that is what
you mean. Could you give an example of an email client that can do
this? (I don't think the gmail webclient can).
the patches from John look correct here (mutt).

+// Tells OS to open a File or URL
+// Formats::view does not seem appropriate as it wants a Buffer
+static void system_viewer (string url) {
+       string open_cmd;
+       #ifdef _WIN32
+       open_cmd = "start";
+       #elif defined(USE_MACOSX_PACKAGING)
+       open_cmd = "open";
+       #else
+       open_cmd = "xdg-open";
xdg-open for anything launches firefox here and let him decide
what to do with the extension. we should use our defined viewers
for formats we know (like pdf, html).

xdg-open should open different things depending upon the extension. Here, e.g., xdg-open file.tex opens kile. I guess, though, that it will never execute anything, right? But this isn't true on Windows, I do not think.

Still, you are right that we should use defined viewers for things we know about.

rh

Reply via email to