more direct Isabelle_System.pdf_viewer;
generic Isabelle_System.open, e.g. for URLs;
--- a/src/Pure/System/isabelle_system.scala Sat Dec 07 12:52:31 2013 +0100
+++ b/src/Pure/System/isabelle_system.scala Sat Dec 07 13:10:56 2013 +0100
@@ -419,6 +419,12 @@
}
}
+ def open(arg: String): Unit =
+ bash("exec \"$ISABELLE_OPEN\" '" + arg + "' >/dev/null 2>/dev/null &")
+
+ def pdf_viewer(arg: Path): Unit =
+ bash("exec \"$PDF_VIEWER\" '" + standard_path(arg) + "' >/dev/null 2>/dev/null &")
+
/** Isabelle resources **/
--- a/src/Pure/Tools/doc.scala Sat Dec 07 12:52:31 2013 +0100
+++ b/src/Pure/Tools/doc.scala Sat Dec 07 13:10:56 2013 +0100
@@ -81,12 +81,10 @@
def view(name: String)
{
- val doc = name + ".pdf"
- dirs().find(dir => (dir + Path.basic(doc)).is_file) match {
- case Some(dir) =>
- Isabelle_System.bash_env(dir.file, null,
- "\"$ISABELLE_TOOL\" display " + quote(doc) + " >/dev/null 2>/dev/null &")
- case None => error("Missing Isabelle documentation file: " + quote(doc))
+ val doc = Path.basic(name + ".pdf")
+ dirs().find(dir => (dir + doc).is_file) match {
+ case Some(dir) => Isabelle_System.pdf_viewer(dir + doc)
+ case None => error("Missing Isabelle documentation file: " + doc)
}
}