-
- ;; TODO: make educated guess which browser to run.
- (system (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri)))
+ (system
+ (if (getenv "BROWSER")
+ (format #f "~a ~a" (getenv "BROWSER") uri)
+ (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
+
+
+(define (strip-framework-path var)
+ (define pat "lilypond/usr")
+ (if (getenv var)
+ (let*
+ ((val (getenv var))
+ (paths (string-split val #\:))
+ (without (remove (lambda (s) (string-contains s pat))
+ paths)))
+
+ (if (not (= (length without)
+ (length paths)))
+ (setenv var (string-join without ":"))))))