]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-invoke-editor.scm
Add '-dcrop' option to ps and svg backends
[lilypond.git] / scripts / lilypond-invoke-editor.scm
index 230b1761d44c1118f69908af2a59bd3823f2ac39..6658f50166dfe4d98f56d2d2aad068d4e291f864 100644 (file)
@@ -2,7 +2,7 @@
 !#
 ;;;; lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode
 
-;;;; Copyright (C) 2005--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2005--2015 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
@@ -89,7 +89,7 @@ Options:
          uri))
 
 (define (is-textedit-uri? uri)
-  (string-match "^textedit://" uri))
+  (string-match "^textedit:" uri))
   
   
 (define (dissect-uri uri)
@@ -129,7 +129,7 @@ Options:
 (define (run-browser uri)
   (system
    (if (getenv "BROWSER")
-       (format "~a ~a" (getenv "BROWSER") uri)
+       (format #f "~a ~a" (getenv "BROWSER") uri)
        (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
 
 
@@ -151,9 +151,12 @@ Options:
     (if (running-from-gui?)
        (redirect-port (current-error-port)
                       (open-file (string-append
-                                  (or (getenv "TMP")
-                                      (getenv "TEMP")
-                                      "/tmp")
+                                   (if (string-match "^(Windows|CYGWIN)"
+                                                     (utsname:sysname (uname)))
+                                       (or (getenv "TMP")
+                                           (getenv "TEMP"))
+                                       (or (getenv "TMPDIR")
+                                           "/tmp"))
                                   "/lilypond-invoke-editor.log") "a")))
     (if (not (= (length files) 1))
        (begin