lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] PS-compilation, PS-viewing and MIDI-play in LilyPond -Emacs-


From: Heikki Johannes Junes
Subject: Re: [PATCH] PS-compilation, PS-viewing and MIDI-play in LilyPond -Emacs-mode.
Date: Wed, 29 Aug 2001 04:28:13 +0300 (EET DST)

I found that xdvi is supported as default viewer for Emacs. 
I cannot use the note pointing facility created for xdvi. Actually, I can
not us xdvi at all due to mixing of font accuracies between 600 and 
300dpi.

So, I have to use GhostView to print the files is PS-mode.
On the other hand, I am used to the support of anti-aliasing in GhostView.

I created a patch that allows PS-compilation, PS-viewing and MIDI-play in
the menus in LilyPond -Emacs-mode. Maybe some others also find this
useful. I do not need to use command prompt for those tasks anymore.

I would have made also keyboard accelerators like in LaTeX-compilation:
  C-c(ommand) C-f(ormat)  for (PS-)compilation,
  C-c(ommand) C-v(iew)    for (PS-)view,
and for playing
  C-c(ommand) C-m(idi)    for (MIDI-)play,
but as I am new to lisp I could not do it yet. Anyway, here is the patch.

diff -urN lilypond-1.5.7/CHANGES lilypond-1.5.7.NEW/CHANGES
--- lilypond-1.5.7/CHANGES      Wed Aug 29 03:52:29 2001
+++ lilypond-1.5.7.NEW/CHANGES  Wed Aug 29 03:58:50 2001
@@ -1,3 +1,8 @@
+1.5.7.hjj2
+==========
+
+* Add PS-compilation, PS-viewing and MIDI-play in LilyPond -Emacs-mode.
+
 1.5.7.hjj1
 ==========
 
diff -urN lilypond-1.5.7/lilypond-mode.el lilypond-1.5.7.NEW/lilypond-mode.el
--- lilypond-1.5.7/lilypond-mode.el     Tue Jul 24 14:39:46 2001
+++ lilypond-1.5.7.NEW/lilypond-mode.el Wed Aug 29 03:58:42 2001
@@ -4,6 +4,9 @@
 ;;; source file of the GNU LilyPond music typesetter
 ;;; 
 ;;; (c) 1999--2001 Jan Nieuwenhuizen <address@hidden>
+;;; 
+;;; Changed 29th Aug 2001 Heikki Junes <address@hidden>
+;;;    * Add PS-compilation, PS-viewing and MIDI-play
 
 ;;; Inspired on auctex
 
@@ -132,6 +135,18 @@
   :group 'LilyPond
   :type 'string)
 
+(defcustom LilyPond-gv-command "gv -watch"
+  "Command used to display PS files."
+
+  :group 'LilyPond
+  :type 'string)
+
+(defcustom LilyPond-midi-command "timidity"
+  "Command used to play MIDI files."
+
+  :group 'LilyPond
+  :type 'string)
+
 ;; This is the major configuration variable.
 (defcustom LilyPond-command-alist
   `(
@@ -139,6 +154,7 @@
     ("TeX" . ("tex '\\nonstopmode\\input %t'" . "View"))
 
     ("2Dvi" . ("ly2dvi %s" . "View"))
+    ("2PS" . ("ly2dvi -P %s" . "View"))
 
     ("Book" . ("lilypond-book %x" . "LaTeX"))
     ("LaTeX" . ("latex '\\nonstopmode\\input %l'" . "View"))
@@ -148,6 +164,10 @@
     
     ;; refreshes when kicked USR1
     ("View" . (,(concat LilyPond-xdvi-command " %d") . "LilyPond"))
+
+    ("ViewPS" . (,(concat LilyPond-gv-command " %p") . "LilyPond"))
+
+    ("Midi" . (,(concat LilyPond-midi-command " %m") . "LilyPond"))
     )
 
   "AList of commands to execute on the current document.
@@ -180,6 +200,7 @@
     ("%p" . ".ps")
     ("%l" . ".latex")
     ("%x" . ".tely")
+    ("%m" . ".midi")
     )
     
   "Alist of expansion strings for LilyPond command names."

      Heikki
--
      Heikki Junes
Addr. Jääkärinkatu 6A a10, FIN-00150 Helsinki
 Mob. +358 50 549 7873




reply via email to

[Prev in Thread] Current Thread [Next in Thread]