!#
;;;; lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode
-;;;; Copyright (C) 2005--2012 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2005--2015 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
(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