+2005-05-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scripts/lilypond-pdfpc-helper.py (ly_pc_editor): robustness.
+
2005-05-10 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/backend-library.scm (postscript->pdf): Invoke gs instead of
(file, line, column) = tuple (match.groups())
-editor = os.environ['EDITOR']
+
+editor = ''
+try:
+ editor = os.environ['EDITOR']
+except KeyError:
+ pass
ly_pc_editor = None
try:
ly_pc_editor = os.environ['LYEDITOR']
elif re.search ('nedit', editor):
ly_pc_editor = 'nc -noask +%(line)s %(file)s'
+if not ly_pc_editor:
+ sys.stderr.write ("Need to set EDITOR or LYEDITOR")
+ sys.exit (1)
+
command = ly_pc_editor % vars()
print 'invoked with %s\ncalling %s\n' % (string.join (sys.argv),command)